diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2021-10-10 14:18:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-10 10:18:19 -0400 |
commit | 0bd98dadeb6e0acc42566a5b70124ed8d1027acd (patch) | |
tree | 3c202f0298a58d70292816a7ae63c02706aa2896 /pkgs/tools/typesetting | |
parent | 335de1a8800a04fcee8d3d25e9f7e10387eec496 (diff) |
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>
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive/combine.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index 1367d651a091..9569ec88854f 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 = |