Merge pull request #56797 from veprbl/pr/texlive-2018-final

texlive: 2018 -> 2018-final
This commit is contained in:
Dmitry Kalinkin 2019-03-12 13:37:10 -04:00 committed by GitHub
commit 05edf030fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3142 additions and 2187 deletions

View file

@ -1,18 +1,14 @@
{ stdenv, fetchFromGitHub, perlPackages }:
{ stdenv, fetchFromGitHub, perlPackages, texlive }:
# builds but doesn't work with perl 5.24, see discussion in #40826
# TODO: build with perl >=5.26 and try to enable tests
let
biberSource = stdenv.lib.head (builtins.filter (p: p.tlType == "source") texlive.biber.pkgs);
in
perlPackages.buildPerlModule rec {
name = "biber-${version}";
version = "2.11";
inherit (biberSource) version;
src = fetchFromGitHub {
owner = "plk";
repo = "biber";
rev = "v${version}";
sha256 = "0qgkc1k9n36yfmndwz879pak6mjphld0p85lzn9g2ng0vhxsifzz";
};
src = "${biberSource}/source/bibtex/biber/biblatex-biber.tar.gz";
buildInputs = with perlPackages; [
autovivification BusinessISBN BusinessISMN BusinessISSN ConfigAutoConf
@ -25,8 +21,9 @@ perlPackages.buildPerlModule rec {
TestDifferences
];
# Tests depend on the precise Unicode-Collate version (expects 1.19, but we have 1.25)
doCheck = false;
checkInputs = with perlPackages; [
UnicodeCollate
];
meta = with stdenv.lib; {
description = "Backend for BibLaTeX";

View file

@ -15,11 +15,11 @@ let
pkgList = rec {
all = lib.filter pkgFilter (combinePkgs pkgSet);
splitBin = builtins.partition (p: p.tlType == "bin") all;
bin = mkUniquePkgs splitBin.right
bin = mkUniqueOutPaths splitBin.right
++ lib.optional
(lib.any (p: p.tlType == "run" && p.pname == "pdfcrop") splitBin.wrong)
(lib.getBin ghostscript);
nonbin = mkUniquePkgs splitBin.wrong;
nonbin = mkUniqueOutPaths splitBin.wrong;
# extra interpreters needed for shebangs, based on 2015 schemes "medium" and "tetex"
# (omitted tk needed in pname == "epspdf", bin/epspdftk)
@ -31,9 +31,16 @@ let
++ lib.optional (lib.any pkgNeedsRuby splitBin.wrong) ruby;
};
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);
# 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);
uniqueStrings = fastUnique (a: b: a < b);
mkUniqueOutPaths = pkgs: uniqueStrings
(map (p: p.outPath) (builtins.filter lib.isDerivation pkgs));
in buildEnv {
name = "texlive-${extraName}-${bin.texliveYear}";
@ -125,10 +132,15 @@ in buildEnv {
# updmap.cfg seems like not needing changes
# now filter hyphenation patterns, in a hacky way ATM
(let script =
writeText "hyphens.sed" (
lib.concatMapStrings (pkg: "/^\% from ${pkg.pname}/,/^\%/p;\n") pkgList.splitBin.wrong
+ "1,/^\% from/p;" );
(let
pnames = uniqueStrings (map (p: p.pname) pkgList.splitBin.wrong);
script =
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 ''
(
cd ./share/texmf/tex/generic/config/

View file

@ -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
};
@ -108,23 +108,8 @@ let
# Common packages should get served from the binary cache anyway.
# See discussions, e.g. https://github.com/NixOS/nixpkgs/issues/24683
urlPrefixes = args.urlPrefixes or [
# A snapshot temporarily hosted by @xeji.
# TODO: remove when there is a reliable long-term solution
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
http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2018/tlnet-final/archive
ftp://tug.org/texlive/historic/2018/tlnet-final/archive
];
src = fetchurl { inherit urls sha512; };
@ -171,12 +156,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;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff