Skip to content

Instantly share code, notes, and snippets.

@LnL7
Created January 29, 2021 17:32
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 LnL7/6548d5743cdff0b4291de70b73ad8ad6 to your computer and use it in GitHub Desktop.
Save LnL7/6548d5743cdff0b4291de70b73ad8ad6 to your computer and use it in GitHub Desktop.
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