-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relates to #4
- Loading branch information
Showing
7 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ cabal.project.local~ | |
.HTF/ | ||
.ghc.environment.* | ||
.ghci | ||
|
||
### Nix ### | ||
/result* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ system ? builtins.currentSystem | ||
, crossSystem ? null | ||
, config ? {} | ||
|
||
# Import IOHK common nix lib | ||
, iohkLib ? import ./nix/iohk-common.nix | ||
# Pin nixpkgs to a revision on the nixos-19.03 channel | ||
, nixpkgs ? iohkLib.fetchNixpkgs ./nix/nixpkgs-src.json | ||
, pkgs ? import nixpkgs { inherit system crossSystem config; } | ||
|
||
# Keep this argument even if unused. | ||
# It will prevent Hydra from caching the evaluation. | ||
, gitrev ? iohkLib.commitIdFromGitRepo ./. | ||
}: | ||
|
||
{ | ||
inherit pkgs; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Imports the iohk-nix library. | ||
# The version can be overridden for debugging purposes by setting | ||
# NIX_PATH=iohk_nix=/path/to/iohk-nix | ||
|
||
import ( | ||
let try = builtins.tryEval <iohk_nix>; | ||
in if try.success | ||
then builtins.trace "using host <iohk_nix>" try.value | ||
else | ||
let | ||
spec = builtins.fromJSON (builtins.readFile ./iohk-nix.json); | ||
in builtins.fetchTarball { | ||
url = "${spec.url}/archive/${spec.rev}.tar.gz"; | ||
inherit (spec) sha256; | ||
}) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"url": "https://github.com/input-output-hk/iohk-nix", | ||
"rev": "f20ab3940d3ec5d5a3d92e1f0544f501316adc43", | ||
"date": "2019-02-15T19:35:36+10:00", | ||
"sha256": "07hla7d0l91is5m5mwa86vq51fdxkjvbjv7176ipdg1z59wy21bj", | ||
"fetchSubmodules": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"url": "https://github.com/NixOS/nixpkgs.git", | ||
"rev": "07e2b59812de95deeedde95fb6ba22d581d12fbc", | ||
"date": "2019-02-26T15:31:33+01:00", | ||
"sha256": "1yxmv04v2dywk0a5lxvi9a2rrfq29nw8qsm33nc856impgxadpgf", | ||
"fetchSubmodules": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This is the derivation used by "stack --nix". | ||
# It provides the system dependencies required for a stack build. | ||
{ system ? builtins.currentSystem | ||
, config ? {} | ||
, walletPackages ? import ./.. { inherit config system; } | ||
, pkgs ? walletPackages.pkgs | ||
}: | ||
with pkgs; | ||
|
||
haskell.lib.buildStackProject { | ||
name = "cardano-wallet-stack-env"; | ||
ghc = haskell.compiler.ghc863; | ||
|
||
buildInputs = [ | ||
zlib gmp ncurses lzma openssl git | ||
] ++ (lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Cocoa CoreServices libcxx libiconv ])); | ||
|
||
phases = ["nobuildPhase"]; | ||
nobuildPhase = "mkdir -p $out"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters