Skip to content

Instantly share code, notes, and snippets.

@samueldr

samueldr/foo.nix Secret

Created September 21, 2018 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueldr/69cd70d7956f658090c392f287034f86 to your computer and use it in GitHub Desktop.
Save samueldr/69cd70d7956f658090c392f287034f86 to your computer and use it in GitHub Desktop.
with (import <nixpkgs> {});
stdenv.mkDerivation {
name = "testing";
foo = ["a" "b" "c"];
bar = "a b c";
prePatch = ''
echo "$foo"
echo "$bar"
for x in $foo; do echo $x; done
for x in $bar; do echo $x; done
exit 1
'';
unpackPhase = ":";
src = ./test.nix;
}
@samueldr
Copy link
Author

these derivations will be built:
  /nix/store/5azzcpcsr0306k27flj74lbwlgsa5j9m-testing.drv
building '/nix/store/5azzcpcsr0306k27flj74lbwlgsa5j9m-testing.drv'...
unpacking sources
patching sources
a b c
a b c
a
b
c
a
b
c
builder for '/nix/store/5azzcpcsr0306k27flj74lbwlgsa5j9m-testing.drv' failed with exit code 1
error: build of '/nix/store/5azzcpcsr0306k27flj74lbwlgsa5j9m-testing.drv' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment