diff --git a/pkgs/build-support/trivial-builders/test/concat-test.nix b/pkgs/build-support/trivial-builders/test/concat-test.nix index d719ea7cd53c..59990a5124ab 100644 --- a/pkgs/build-support/trivial-builders/test/concat-test.nix +++ b/pkgs/build-support/trivial-builders/test/concat-test.nix @@ -1,18 +1,11 @@ -{ callPackage, lib, pkgs, runCommand, writeText, writeStringReferencesToFile }: +{ callPackage, lib, pkgs, runCommand, concatText, writeText, hello }: let - sample = import ./sample.nix { inherit pkgs; }; - samplePaths = lib.unique (lib.attrValues sample); - str2drv = x: "${x}"; - sampleText = concatText "cample-concat" (lib.unique (map str2drv samplePaths)); - stringReferencesText = - writeStringReferencesToFile - ((lib.concatMapStringsSep "fillertext" - stri - (lib.attrValues sample)) + '' - STORE=${builtins.storeDir};\nsystemctl start bar-foo.service - ''); + stri = writeText "pathToTest"; + txt1 = stri "abc"; + txt2 = stri hello; + res = concatText "textToTest" [ txt1 txt2 ]; in -runCommand "test-writeStringReferencesToFile" { } '' - diff -U3 <(sort ${stringReferencesText}) <(sort ${sampleText}) +runCommand "test-concatPaths" { } '' + diff -U3 <(cat ${txt1} ${txt2}) ${res} touch $out '' diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index e3ef7839c4b4..3f148eefef9c 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -57,6 +57,7 @@ with pkgs; writeStringReferencesToFile = callPackage ../build-support/trivial-builders/test/writeStringReferencesToFile.nix {}; references = callPackage ../build-support/trivial-builders/test/references.nix {}; overriding = callPackage ../build-support/trivial-builders/test-overriding.nix {}; + concat = callPackage ../build-support/trivial-builders/test/concat-test.nix {}; }; writers = callPackage ../build-support/writers/test.nix {};