Skip to content

Instantly share code, notes, and snippets.

@bennofs
Created August 26, 2014 10:04
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 bennofs/8293d1e1955f5a276981 to your computer and use it in GitHub Desktop.
Save bennofs/8293d1e1955f5a276981 to your computer and use it in GitHub Desktop.
create file in nix store in builder
with (import <nixpkgs> {});
derivation {
name = "b";
builder = "${bash}/bin/bash";
args = ["-c" "echo 3 > /nix/store/foo; read foo < /nix/store/foo; echo $foo > $out"];
system = "${builtins.currentSystem}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment