Merge pull request #56797 from veprbl/pr/texlive-2018-final
texlive: 2018 -> 2018-final
This commit is contained in:
commit
05edf030fc
@ -1,18 +1,14 @@
|
|||||||
{ stdenv, fetchFromGitHub, perlPackages }:
|
{ stdenv, fetchFromGitHub, perlPackages, texlive }:
|
||||||
|
|
||||||
# builds but doesn't work with perl 5.24, see discussion in #40826
|
let
|
||||||
# TODO: build with perl >=5.26 and try to enable tests
|
biberSource = stdenv.lib.head (builtins.filter (p: p.tlType == "source") texlive.biber.pkgs);
|
||||||
|
in
|
||||||
|
|
||||||
perlPackages.buildPerlModule rec {
|
perlPackages.buildPerlModule rec {
|
||||||
name = "biber-${version}";
|
name = "biber-${version}";
|
||||||
version = "2.11";
|
inherit (biberSource) version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = "${biberSource}/source/bibtex/biber/biblatex-biber.tar.gz";
|
||||||
owner = "plk";
|
|
||||||
repo = "biber";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0qgkc1k9n36yfmndwz879pak6mjphld0p85lzn9g2ng0vhxsifzz";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = with perlPackages; [
|
buildInputs = with perlPackages; [
|
||||||
autovivification BusinessISBN BusinessISMN BusinessISSN ConfigAutoConf
|
autovivification BusinessISBN BusinessISMN BusinessISSN ConfigAutoConf
|
||||||
@ -25,8 +21,9 @@ perlPackages.buildPerlModule rec {
|
|||||||
TestDifferences
|
TestDifferences
|
||||||
];
|
];
|
||||||
|
|
||||||
# Tests depend on the precise Unicode-Collate version (expects 1.19, but we have 1.25)
|
checkInputs = with perlPackages; [
|
||||||
doCheck = false;
|
UnicodeCollate
|
||||||
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Backend for BibLaTeX";
|
description = "Backend for BibLaTeX";
|
||||||
|
@ -15,11 +15,11 @@ let
|
|||||||
pkgList = rec {
|
pkgList = rec {
|
||||||
all = lib.filter pkgFilter (combinePkgs pkgSet);
|
all = lib.filter pkgFilter (combinePkgs pkgSet);
|
||||||
splitBin = builtins.partition (p: p.tlType == "bin") all;
|
splitBin = builtins.partition (p: p.tlType == "bin") all;
|
||||||
bin = mkUniquePkgs splitBin.right
|
bin = mkUniqueOutPaths splitBin.right
|
||||||
++ lib.optional
|
++ lib.optional
|
||||||
(lib.any (p: p.tlType == "run" && p.pname == "pdfcrop") splitBin.wrong)
|
(lib.any (p: p.tlType == "run" && p.pname == "pdfcrop") splitBin.wrong)
|
||||||
(lib.getBin ghostscript);
|
(lib.getBin ghostscript);
|
||||||
nonbin = mkUniquePkgs splitBin.wrong;
|
nonbin = mkUniqueOutPaths splitBin.wrong;
|
||||||
|
|
||||||
# extra interpreters needed for shebangs, based on 2015 schemes "medium" and "tetex"
|
# extra interpreters needed for shebangs, based on 2015 schemes "medium" and "tetex"
|
||||||
# (omitted tk needed in pname == "epspdf", bin/epspdftk)
|
# (omitted tk needed in pname == "epspdf", bin/epspdftk)
|
||||||
@ -31,9 +31,16 @@ let
|
|||||||
++ lib.optional (lib.any pkgNeedsRuby splitBin.wrong) ruby;
|
++ lib.optional (lib.any pkgNeedsRuby splitBin.wrong) ruby;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkUniquePkgs = pkgs: fastUnique (a: b: a < b) # highlighting hack: >
|
# TODO: replace by buitin once it exists
|
||||||
# here we deal with those dummy packages needed for hyphenation filtering
|
fastUnique = comparator: list: with lib;
|
||||||
(map (p: if lib.isDerivation p then p.outPath else "") pkgs);
|
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);
|
||||||
|
|
||||||
|
uniqueStrings = fastUnique (a: b: a < b);
|
||||||
|
|
||||||
|
mkUniqueOutPaths = pkgs: uniqueStrings
|
||||||
|
(map (p: p.outPath) (builtins.filter lib.isDerivation pkgs));
|
||||||
|
|
||||||
in buildEnv {
|
in buildEnv {
|
||||||
name = "texlive-${extraName}-${bin.texliveYear}";
|
name = "texlive-${extraName}-${bin.texliveYear}";
|
||||||
@ -125,10 +132,15 @@ in buildEnv {
|
|||||||
# updmap.cfg seems like not needing changes
|
# updmap.cfg seems like not needing changes
|
||||||
|
|
||||||
# now filter hyphenation patterns, in a hacky way ATM
|
# now filter hyphenation patterns, in a hacky way ATM
|
||||||
(let script =
|
(let
|
||||||
writeText "hyphens.sed" (
|
pnames = uniqueStrings (map (p: p.pname) pkgList.splitBin.wrong);
|
||||||
lib.concatMapStrings (pkg: "/^\% from ${pkg.pname}/,/^\%/p;\n") pkgList.splitBin.wrong
|
script =
|
||||||
+ "1,/^\% from/p;" );
|
writeText "hyphens.sed" (
|
||||||
|
# pick up the header
|
||||||
|
"1,/^\% from/p;"
|
||||||
|
# pick up all sections matching packages that we combine
|
||||||
|
+ lib.concatMapStrings (pname: "/^\% from ${pname}:$/,/^\%/p;\n") pnames
|
||||||
|
);
|
||||||
in ''
|
in ''
|
||||||
(
|
(
|
||||||
cd ./share/texmf/tex/generic/config/
|
cd ./share/texmf/tex/generic/config/
|
||||||
|
@ -24,7 +24,7 @@ let
|
|||||||
|
|
||||||
# function for creating a working environment from a set of TL packages
|
# function for creating a working environment from a set of TL packages
|
||||||
combine = import ./combine.nix {
|
combine = import ./combine.nix {
|
||||||
inherit bin combinePkgs buildEnv fastUnique lib makeWrapper writeText
|
inherit bin combinePkgs buildEnv lib makeWrapper writeText
|
||||||
stdenv python ruby perl;
|
stdenv python ruby perl;
|
||||||
ghostscript = ghostscriptX; # could be without X, probably, but we use X above
|
ghostscript = ghostscriptX; # could be without X, probably, but we use X above
|
||||||
};
|
};
|
||||||
@ -108,23 +108,8 @@ let
|
|||||||
# Common packages should get served from the binary cache anyway.
|
# Common packages should get served from the binary cache anyway.
|
||||||
# See discussions, e.g. https://github.com/NixOS/nixpkgs/issues/24683
|
# See discussions, e.g. https://github.com/NixOS/nixpkgs/issues/24683
|
||||||
urlPrefixes = args.urlPrefixes or [
|
urlPrefixes = args.urlPrefixes or [
|
||||||
# A snapshot temporarily hosted by @xeji.
|
http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2018/tlnet-final/archive
|
||||||
# TODO: remove when there is a reliable long-term solution
|
ftp://tug.org/texlive/historic/2018/tlnet-final/archive
|
||||||
https://cat3.de/texlive-2018/tlnet/archive
|
|
||||||
|
|
||||||
# TODO: Add second, faster and more reliable snapshot mirror,
|
|
||||||
# maybe on one of our project's servers
|
|
||||||
|
|
||||||
# IPFS seeded by the mirror above - this may be quite slow
|
|
||||||
https://ipfs.io/ipfs/QmT4Z67wXin1Z9DhvqwSSkSZSuu8hT6LgDyMu6CBm9Tb7t/tlnet/archive
|
|
||||||
|
|
||||||
# The canonical source moves quickly and will be broken almost immediately
|
|
||||||
http://mirror.ctan.org/tex-archive/systems/texlive/tlnet/archive
|
|
||||||
|
|
||||||
# Should be stable for historic, archived releases
|
|
||||||
# http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2018/tlnet-final/archive
|
|
||||||
# TODO: use this later when 2018 is archived
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
src = fetchurl { inherit urls sha512; };
|
src = fetchurl { inherit urls sha512; };
|
||||||
@ -171,12 +156,6 @@ let
|
|||||||
combinePkgs = pkgSet: lib.concatLists # uniqueness is handled in `combine`
|
combinePkgs = pkgSet: lib.concatLists # uniqueness is handled in `combine`
|
||||||
(lib.mapAttrsToList (_n: a: a.pkgs) pkgSet);
|
(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
|
in
|
||||||
tl // {
|
tl // {
|
||||||
inherit bin combine;
|
inherit bin combine;
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user