Created
January 29, 2021 17:32
-
-
Save LnL7/6548d5743cdff0b4291de70b73ad8ad6 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
let | |
builder = "${builtins.storePath <bash>}/bin/bash"; | |
in | |
{ | |
# nix-build basic.nix -A foo -I bash=$(nix-build '<nixpkgs>' -A bash --no-out-link) | |
foo = derivation { | |
name = "foo-0.0.0"; | |
inherit builder; | |
args = ["-c" "echo 42 > $out"]; | |
system = "x86_64-darwin"; | |
}; | |
# nix-build basic.nix -A bar -I bash=$(nix-build '<nixpkgs>' -A bash --no-out-link) | |
bar = derivation { | |
name = "bar-0.0.0"; | |
inherit builder; | |
args = ["-c" "echo 42 > $out"]; | |
system = "x86_64-darwin"; | |
__impureHostDeps = [ "/usr/lib/libSystem.B.dylib" ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment