texlive: move fastUnique from default.nix to combine.nix
This commit is contained in:
parent
fdfcc4c292
commit
a1505f3c6a
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user