mirror of
https://github.com/NixOS/nix
synced 2025-07-10 21:23:56 +02:00
* Add a test for importing derivations.
This commit is contained in:
parent
330df4b4db
commit
4c9fdd2cd6
3 changed files with 37 additions and 1 deletions
23
tests/import-derivation.nix
Normal file
23
tests/import-derivation.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
with import ./config.nix;
|
||||
|
||||
let
|
||||
|
||||
bar = mkDerivation {
|
||||
name = "bar";
|
||||
builder = builtins.toFile "builder.sh"
|
||||
''
|
||||
echo 'builtins.add 123 456' > $out
|
||||
'';
|
||||
};
|
||||
|
||||
value = import bar;
|
||||
|
||||
in
|
||||
|
||||
mkDerivation {
|
||||
name = "foo";
|
||||
builder = builtins.toFile "builder.sh"
|
||||
''
|
||||
echo -n FOO${toString value} > $out
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue