1 { callPackage, lib, pkgs, runCommand, samples, writeText, writeStringReferencesToFile }:
3 samplePaths = lib.unique (lib.attrValues samples);
5 sampleText = writeText "sample-text" (lib.concatStringsSep "\n" (lib.unique (map stri samplePaths)));
7 writeStringReferencesToFile
8 ((lib.concatMapStringsSep "fillertext"
10 (lib.attrValues samples)) + ''
11 STORE=${builtins.storeDir};\nsystemctl start bar-foo.service
14 runCommand "test-writeStringReferencesToFile" { } ''
15 diff -U3 <(sort ${stringReferencesText}) <(sort ${sampleText})