From 0bd98dadeb6e0acc42566a5b70124ed8d1027acd Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 10 Oct 2021 14:18:19 +0000 Subject: texlive.combine: avoid sorting on store paths (fix CA stability) (#140619) In https://github.com/NixOS/nix/issues/5333 I noticed that adding a minor change to `bash` derivation triggers rebuilds in CA for `bash` (expected) and `texlive.combine` (unexpected). regnat debugged derivation instability down to sort on outPath. The change avoid sorting on outPaths and uses pname of the derivations. Tested on `R` derivation. Closes: https://github.com/NixOS/nix/issues/5333 Co-authored-by: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> --- pkgs/tools/typesetting/tex/texlive/combine.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkgs/tools/typesetting') diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index 1367d651a09..9569ec88854 100644 --- a/pkgs/tools/typesetting/tex/texlive/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive/combine.nix @@ -33,9 +33,9 @@ let ++ lib.optional (lib.any pkgNeedsRuby splitBin.wrong) ruby; }; - uniqueStrings = list: lib.sort (a: b: a < b) (lib.unique list); + sortedUniqueStrings = list: lib.sort (a: b: a < b) (lib.unique list); - mkUniqueOutPaths = pkgs: uniqueStrings + mkUniqueOutPaths = pkgs: lib.unique (map (p: p.outPath) (builtins.filter lib.isDerivation pkgs)); in (buildEnv { @@ -124,9 +124,9 @@ in (buildEnv { # now filter hyphenation patterns and formats (let hyphens = lib.filter (p: p.hasHyphens or false && p.tlType == "run") pkgList.splitBin.wrong; - hyphenPNames = uniqueStrings (map (p: p.pname) hyphens); + hyphenPNames = sortedUniqueStrings (map (p: p.pname) hyphens); formats = lib.filter (p: p.hasFormats or false && p.tlType == "run") pkgList.splitBin.wrong; - formatPNames = uniqueStrings (map (p: p.pname) formats); + formatPNames = sortedUniqueStrings (map (p: p.pname) formats); # sed expression that prints the lines in /start/,/end/ except for /end/ section = start: end: "/${start}/,/${end}/{ /${start}/p; /${end}/!p; };\n"; script = -- cgit 1.4.1