Last active
September 18, 2015 15:46
-
-
Save adnelson/fc1e46392e99a310dafe to your computer and use it in GitHub Desktop.
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
source $stdenv/setup | |
echo test1 > $out | |
export FOO=BAR | |
echo "FOO from d1 is: $FOO" |
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
source $stdenv/setup | |
echo "FOO is: $FOO" | tee $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
let | |
pkgs = import <nixpkgs> {}; | |
in | |
let | |
d1 = derivation { | |
inherit (pkgs) stdenv; | |
name = "d1"; | |
src = ./.; | |
system = builtins.currentSystem; | |
builder = ./builder1.sh; | |
buildInputs = [pkgs.python]; | |
}; | |
d2 = derivation { | |
inherit (pkgs) stdenv; | |
name = "d2"; | |
src = ./.; | |
system = builtins.currentSystem; | |
builder = ./builder2.sh; | |
buildInputs = [d1]; | |
}; | |
in | |
d2 |
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
$ nix-build default.nix | |
these derivations will be built: | |
/nix/store/vgjnvg6sw4gpq5ngvamnrvi3v6sgb2kw-d1.drv | |
/nix/store/4a00ylk9d2br5z4lcqzccnplxs4srqhc-d2.drv | |
building path(s) ‘/nix/store/n61rcbzw49i7v5kf7sgrlw0q6rqnj7iy-d1’ | |
while setting up the build environment: executing ‘/nix/store/ffliclfpnpkjllxbn96awgmb7wasid44-builder1.sh’: Exec format error | |
builder for ‘/nix/store/vgjnvg6sw4gpq5ngvamnrvi3v6sgb2kw-d1.drv’ failed with exit code 1 | |
cannot build derivation ‘/nix/store/4a00ylk9d2br5z4lcqzccnplxs4srqhc-d2.drv’: 1 dependencies couldn't be built | |
error: build of ‘/nix/store/4a00ylk9d2br5z4lcqzccnplxs4srqhc-d2.drv’ failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment