nixpkgs/pkgs/build-support/trivial-builders/test/sample.nix
Robert Hensing 51f7c15df9 test.trivial-builders: Add test cases, fix test runner, rename
The writeStringReferencesToFile didn't handle non-unique references
to the same path correctly.
2021-11-01 00:06:03 +01:00

30 lines
750 B
Nix

{ pkgs ? import ../../../.. { config = { }; overlays = [ ]; } }:
let
inherit (pkgs)
figlet
zlib
hello
writeText
runCommand
;
in
{
hello = hello;
figlet = figlet;
zlib = zlib;
zlib-dev = zlib.dev;
norefs = writeText "hi" "hello";
norefsDup = writeText "hi" "hello";
helloRef = writeText "hi" "hello ${hello}";
helloRefDup = writeText "hi" "hello ${hello}";
path = ./invoke-writeReferencesToFile.nix;
pathLike.outPath = ./invoke-writeReferencesToFile.nix;
helloFigletRef = writeText "hi" "hello ${hello} ${figlet}";
selfRef = runCommand "self-ref-1" {} "echo $out >$out";
selfRef2 = runCommand "self-ref-2" {} ''echo "${figlet}, $out" >$out'';
inherit (pkgs)
emptyFile
emptyDirectory
;
}