From 58dc076f6fc882937dcb8fa69733c2e315686399 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Mon, 14 Aug 2023 13:14:11 +0100 Subject: [PATCH 1/3] biber: remove outdated UnicodeCollate version --- pkgs/tools/typesetting/biber/default.nix | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/pkgs/tools/typesetting/biber/default.nix b/pkgs/tools/typesetting/biber/default.nix index 024f25dd1fb9..8136266fbab9 100644 --- a/pkgs/tools/typesetting/biber/default.nix +++ b/pkgs/tools/typesetting/biber/default.nix @@ -2,20 +2,6 @@ let biberSource = lib.head (builtins.filter (p: p.tlType == "source") texlive.biber.pkgs); - - # perl 5.32.0 ships with U:C 1.27 - UnicodeCollate_1_29 = perlPackages.buildPerlPackage rec { - pname = "Unicode-Collate"; - version = "1.29"; - src = fetchurl { - url = "mirror://cpan/authors/id/S/SA/SADAHIRO/${pname}-${version}.tar.gz"; - sha256 = "0dr4k10fgbsczh4sz7w8d0nnba38r6jrg87cm3gw4xxgn55fzj7l"; - }; - meta = { - description = "Unicode Collation Algorithm"; - license = perlPackages.perl.meta.license; - }; - }; in perlPackages.buildPerlModule { @@ -30,7 +16,7 @@ perlPackages.buildPerlModule { DateTime DateTimeFormatBuilder DateTimeCalendarJulian ExtUtilsLibBuilder FileSlurper FileWhich IPCRun3 LogLog4perl LWPProtocolHttps ListAllUtils ListMoreUtils MozillaCA ParseRecDescent IOString ReadonlyXS RegexpCommon TextBibTeX - UnicodeCollate_1_29 UnicodeLineBreak URI XMLLibXMLSimple XMLLibXSLT XMLWriter + UnicodeLineBreak URI XMLLibXMLSimple XMLLibXSLT XMLWriter ClassAccessor TextCSV TextCSV_XS TextRoman DataUniqid LinguaTranslit SortKey TestDifferences PerlIOutf8_strict From d2cb5e364275f197ed68d829ce34d440de902412 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Mon, 14 Aug 2023 13:14:11 +0100 Subject: [PATCH 2/3] biber: use license from texlive source --- pkgs/tools/typesetting/biber/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/typesetting/biber/default.nix b/pkgs/tools/typesetting/biber/default.nix index 8136266fbab9..bf4740802be3 100644 --- a/pkgs/tools/typesetting/biber/default.nix +++ b/pkgs/tools/typesetting/biber/default.nix @@ -29,7 +29,7 @@ perlPackages.buildPerlModule { meta = with lib; { description = "Backend for BibLaTeX"; - license = with licenses; [ artistic1 gpl1Plus ]; + license = biberSource.meta.license; platforms = platforms.unix; maintainers = [ maintainers.ttuegel ]; }; From 1729f37d2b44677d8379802f4230e3349a88357b Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Mon, 14 Aug 2023 13:14:11 +0100 Subject: [PATCH 3/3] biber-ms: init --- pkgs/tools/typesetting/biber-ms/default.nix | 55 +++++++++++++++++++ pkgs/tools/typesetting/tex/texlive/bin.nix | 2 + .../tools/typesetting/tex/texlive/default.nix | 3 +- pkgs/top-level/all-packages.nix | 2 + 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/typesetting/biber-ms/default.nix diff --git a/pkgs/tools/typesetting/biber-ms/default.nix b/pkgs/tools/typesetting/biber-ms/default.nix new file mode 100644 index 000000000000..53bd708c23bd --- /dev/null +++ b/pkgs/tools/typesetting/biber-ms/default.nix @@ -0,0 +1,55 @@ +{ lib, stdenv, fetchFromGitHub, fetchurl, perlPackages, shortenPerlShebang, texlive }: + +let + biberSource = lib.head (builtins.filter (p: p.tlType == "source") texlive.biber-ms.pkgs); + # missing test file + multiscriptBltxml = (fetchFromGitHub { + owner = "plk"; + repo = "biber"; + rev = "e8d056433063add7800f24589de76f89c4b64c20"; + hash = "sha256-QnN6Iyw6iOjfTX7DLVptsfAO/QNn9vOIk5IZlI15EvQ="; + }) + "/t/tdata/multiscript.bltxml"; +in + +perlPackages.buildPerlModule { + pname = "biber-ms"; + inherit (biberSource) version; + + src = "${biberSource}/source/bibtex/biber-ms/biblatex-biber-ms.tar.gz"; + + # from META.json + # (aliases in /* */ are replaced by the actual dependencies to prevent + # evaluation errors with config.allowAliases = false) + buildInputs = with perlPackages; [ + # build deps + ConfigAutoConf ExtUtilsLibBuilder FileWhich TestDifferences + /*TestMore=TestSimple=null*/ + # runtime deps + BusinessISBN BusinessISMN BusinessISSN ClassAccessor DataCompare DataDump + DataUniqid DateTimeCalendarJulian DateTimeFormatBuilder EncodeEUCJPASCII + EncodeHanExtra EncodeJIS2K EncodeLocale FileSlurper IOString IPCRun3 + LWPProtocolHttps LWP/*LWPUserAgent*/ libwwwperl LinguaTranslit ListAllUtils + ListMoreUtils ListMoreUtilsXS LogLog4perl MozillaCA ParseRecDescent + PerlIOutf8_strict RegexpCommon SortKey TextBalanced TextBibTeX TextCSV + TextCSV_XS TextRoman URI UnicodeLineBreak XMLLibXML XMLLibXMLSimple + XMLLibXSLT XMLWriter autovivification + ]; + nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; + + preConfigure = '' + cp '${multiscriptBltxml}' t/tdata/multiscript.bltxml + ''; + + postInstall = '' + mv "$out"/bin/biber{,-ms} + '' + lib.optionalString stdenv.isDarwin '' + shortenPerlShebang "$out"/bin/biber-ms + ''; + + meta = with lib; { + description = "Backend for BibLaTeX (multiscript version)"; + license = biberSource.meta.license; + platforms = platforms.unix; + maintainers = [ maintainers.xworld21 ]; + }; +} diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix index 21e916f66429..0df36335311c 100644 --- a/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -6,6 +6,7 @@ , libpaper, graphite2, zziplib, harfbuzz, potrace, gmp, mpfr , brotli, cairo, pixman, xorg, clisp, biber, woff2, xxHash , makeWrapper, shortenPerlShebang, useFixedHashes, asymptote +, biber-ms }: # Useful resource covering build options: @@ -427,6 +428,7 @@ pygmentex = python3Packages.buildPythonApplication rec { inherit asymptote; inherit biber; +inherit biber-ms; bibtexu = bibtex8; bibtex8 = stdenv.mkDerivation { pname = "texlive-bibtex-x.bin"; diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 8dff1469a90d..d6a801afb020 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -7,7 +7,7 @@ , makeWrapper , python3, ruby, perl, tk, jdk, bash, snobol4 , coreutils, findutils, gawk, getopt, gnugrep, gnumake, gnused, gzip, ncurses, zip -, libfaketime, asymptote, makeFontsConf +, libfaketime, asymptote, biber-ms, makeFontsConf , useFixedHashes ? true , recurseIntoAttrs }: @@ -125,7 +125,6 @@ let # TODO patch the scripts from bin.* directly in bin.* instead of here # TODO we do not build binaries for the following packages (yet!) - biber-ms.binfiles = []; xpdfopen.binfiles = []; # mptopdf is a format link, but not generated by texlinks diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9942cd0dc795..7c032c2b41dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6516,6 +6516,8 @@ with pkgs; biber = callPackage ../tools/typesetting/biber { }; + biber-ms = callPackage ../tools/typesetting/biber-ms { }; + biblatex-check = callPackage ../tools/typesetting/biblatex-check { }; binlore = callPackage ../development/tools/analysis/binlore { };