diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2019-03-03 21:06:10 -0500 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2019-03-03 21:06:10 -0500 |
commit | a1505f3c6ab319af0c27f09a3a7faf84b474ca82 (patch) | |
tree | 54af5f7479f79c7a6ecca7e5932e78defb37daac /pkgs/tools/typesetting | |
parent | fdfcc4c2928da12a5d73a367ae5e1afe7f0da49e (diff) |
texlive: move fastUnique from default.nix to combine.nix
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive/combine.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/typesetting/tex/texlive/default.nix | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix index ea2926748198..d2608f89787b 100644 --- a/pkgs/tools/typesetting/tex/texlive/combine.nix +++ b/pkgs/tools/typesetting/tex/texlive/combine.nix @@ -31,6 +31,12 @@ let ++ lib.optional (lib.any pkgNeedsRuby splitBin.wrong) ruby; }; + # TODO: replace by buitin once it exists + fastUnique = comparator: list: with lib; + let un_adj = l: if length l < 2 then l + else optional (head l != elemAt l 1) (head l) ++ un_adj (tail l); + in un_adj (lib.sort comparator list); + mkUniquePkgs = pkgs: fastUnique (a: b: a < b) # highlighting hack: > # here we deal with those dummy packages needed for hyphenation filtering (map (p: if lib.isDerivation p then p.outPath else "") pkgs); diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 4904a60822a0..05e078f8be80 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -24,7 +24,7 @@ let # function for creating a working environment from a set of TL packages combine = import ./combine.nix { - inherit bin combinePkgs buildEnv fastUnique lib makeWrapper writeText + inherit bin combinePkgs buildEnv lib makeWrapper writeText stdenv python ruby perl; ghostscript = ghostscriptX; # could be without X, probably, but we use X above }; @@ -171,12 +171,6 @@ let combinePkgs = pkgSet: lib.concatLists # uniqueness is handled in `combine` (lib.mapAttrsToList (_n: a: a.pkgs) pkgSet); - # TODO: replace by buitin once it exists - fastUnique = comparator: list: with lib; - let un_adj = l: if length l < 2 then l - else optional (head l != elemAt l 1) (head l) ++ un_adj (tail l); - in un_adj (lib.sort comparator list); - in tl // { inherit bin combine; |