Nix (package manager): Difference between revisions

imported>Mic92
imported>Mic92
sandbox cannot be enabled single builds
Line 31: Line 31:
<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
build-use-sandbox = true
build-use-sandbox = true
</syntaxHighlight>
== Enable sandbox builds for a single build ==
Commands like <code>nix-build</code> or <code>nix-shell</code> accept an option flag for single builds.
Suppose you want test a new package called <code>hello</code>, you have added to nixpkgs:
<syntaxHighlight lang="nix">
nix-shell -I nixpkgs=/path/to/nixpkgs --option build-use-sandbox true -p hello
</syntaxHighlight>
</syntaxHighlight>