mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
nix-shell -p: pass --arg values as nixpkgs params
This commit is contained in:
parent
2b67cb7b8c
commit
6eeb6f9c84
3 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
{ inNixShell ? false, contentAddressed ? false }:
|
||||
{ inNixShell ? false, contentAddressed ? false, fooContents ? "foo" }:
|
||||
|
||||
let cfg = import ./config.nix; in
|
||||
with cfg;
|
||||
|
@ -62,7 +62,7 @@ let pkgs = rec {
|
|||
|
||||
foo = runCommand "foo" {} ''
|
||||
mkdir -p $out/bin
|
||||
echo 'echo foo' > $out/bin/foo
|
||||
echo 'echo ${fooContents}' > $out/bin/foo
|
||||
chmod a+rx $out/bin/foo
|
||||
ln -s ${shell} $out/bin/bash
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue