Unverified Commit 08843b81 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by GitHub
Browse files

Merge pull request #296453 from xworld21/texlive-2023-final

texlive: 2023.20240114 -> 2023-final
parents 59f739ab b6cef43d
Loading
Loading
Loading
Loading
+33 −20
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub
, autoreconfHook, bison, glm, flex, wrapQtAppsHook, cmake
, freeglut, ghostscriptX, imagemagick, fftw
{ lib, stdenv, fetchurl, fetchpatch
, autoreconfHook, bison, glm, flex, wrapQtAppsHook, cmake, pkg-config
, freeglut, ghostscriptX, imagemagick, fftw, eigen, libtirpc
, boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv
, python3, qtbase, qtsvg, boost
, zlib, perl, curl
@@ -9,16 +9,25 @@
}:

stdenv.mkDerivation rec {
  version = "2.87";
  version = "2.88";
  pname = "asymptote";

  src = fetchFromGitHub {
    owner = "vectorgraphics";
    repo = pname;
    rev = version;
    hash = "sha256-xzRZ7NOWeu+uC5WeTxwh5MFm7psXMhxrxucT4PVtRxM=";
  outputs = [ "out" "man" "info" "doc" "tex" ];

  src = fetchurl {
    url = "mirror://sourceforge/asymptote/${version}/asymptote-${version}.src.tgz";
    hash = "sha256-DecadD+m7pORuH3Sdcs/5M3vUbN6rhSkFoNN0Soq9bs=";
  };

  patches = [
    (fetchpatch {
      # partial fix for macOS XDR/V3D support (LDFLAGS change seems like an unrelated bugfix)
      name = "restore-LDFLAGS-dont-look-for-tirpc-under-MacOS.patch";
      url = "https://github.com/vectorgraphics/asymptote/commit/7e17096b22d18d133d1bc5916b6e32c0cb24ad10.patch";
      hash = "sha256-olCFzqfZwWOAjqlB5lDPXYRHU9i3VQNgoR0cO5TmW98=";
    })
  ];

  nativeBuildInputs = [
    autoreconfHook
    bison
@@ -27,15 +36,16 @@ stdenv.mkDerivation rec {
    texinfo
    wrapQtAppsHook
    cmake
    pkg-config
  ];

  buildInputs = [
    ghostscriptX imagemagick fftw
    ghostscriptX imagemagick fftw eigen
    boehmgc ncurses readline gsl libsigsegv
    zlib perl curl qtbase qtsvg boost
    (texliveSmall.withPackages (ps: with ps; [ epsf cm-super ps.texinfo media9 ocgx2 collection-latexextra ]))
    (python3.withPackages (ps: with ps; [ cson numpy pyqt5 ]))
  ];
  ] ++ lib.optionals stdenv.isLinux [ libtirpc ];

  propagatedBuildInputs = [
    glm
@@ -47,14 +57,18 @@ stdenv.mkDerivation rec {

  dontWrapQtApps = true;

  # Do not build $tex/ls-R which will be generated by texlive.combine
  preConfigure = ''
    HOME=$TMP
    substituteInPlace Makefile.in \
      --replace-fail 'install: install-notexhash install-texhash' 'install: install-notexhash install-asy'
    prependToVar configureFlags "--with-latex=$tex/tex/latex" "--with-context=$tex/tex/context/third"
  '';

  configureFlags = [
    "--with-latex=$out/share/texmf/tex/latex"
    "--with-context=$out/share/texmf/tex/context/third"
  ];
  # do not use bundled libgc.so
  configureFlags = [ "--enable-gc=system" ]
    # TODO add open_memstream to enable XDR/V3D on Darwin (requires memstream or >=10.13 Apple SDK)
    ++ lib.optional stdenv.isDarwin "--enable-xdr=no";

  env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc";

@@ -62,12 +76,11 @@ stdenv.mkDerivation rec {
    rm "$out"/bin/xasy
    makeQtWrapper "$out"/share/asymptote/GUI/xasy.py "$out"/bin/xasy --prefix PATH : "$out"/bin

    mv $out/share/info/asymptote/*.info $out/share/info/
    sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info
    rmdir $out/share/info/asymptote
    rm -f $out/share/info/dir
    mv "$info"/share/info/asymptote/*.info "$info"/share/info/
    sed -i -e 's|(asymptote/asymptote)|(asymptote)|' "$info"/share/info/asymptote.info
    rmdir "$info"/share/info/asymptote
    rm -f "$info"/share/info/dir

    rm -rf $out/share/texmf
    install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el
  '';

+8 −8
Original line number Diff line number Diff line
@@ -308,11 +308,11 @@ chktex = stdenv.mkDerivation {
# for details see https://wiki.contextgarden.net/Building_LuaMetaTeX_for_TeX_Live
context = stdenv.mkDerivation rec {
  pname = "luametatex";
  version = "2.10.08";
  version = "2.11.02";

  src = fetchurl {
    url = "https://tug.org/svn/texlive/trunk/Master/source/luametatex-${version}.tar.xz?revision=67034&view=co";
    hash = "sha256-3JeOUQ63jJOZWTxFCoyWjfcrspmdmC/yqgS1JaLfTWk=";
    url = "https://tug.org/svn/texlive/trunk/Master/source/luametatex-${version}.tar.xz?revision=70616&view=co";
    hash = "sha256-o7esoBBTTYEstkd7l34BWxew3fIRdVcFiGxrT1/KP1o=";
  };

  enableParallelBuilding = true;
@@ -328,11 +328,11 @@ context = stdenv.mkDerivation rec {

dvisvgm = stdenv.mkDerivation rec {
  pname = "dvisvgm";
  version = "3.1.2";
  version = "3.2.2";

  src = assert lib.assertMsg (version == texlive.pkgs.dvisvgm.version) "dvisvgm: TeX Live version (${texlive.pkgs.dvisvgm.version}) different from source (${version}), please update dvisvgm"; fetchurl {
    url = "https://github.com/mgieseki/dvisvgm/releases/download/${version}/dvisvgm-${version}.tar.gz";
    hash = "sha256-vqeDrf6TG3eUoMMNeQK4Kw1NmtaBbc2KCVqTHNM+rPY=";
    hash = "sha256-8GKL6lqjMUXXWwpqbdGPrYibdSc4y8AcGUGPNUc6HQA=";
  };

  configureFlags = [
@@ -453,7 +453,7 @@ xdvi = stdenv.mkDerivation {

  postInstall = ''
    substituteInPlace "$out/bin/xdvi" \
      --replace "exec xdvi-xaw" "exec '$out/bin/xdvi-xaw'"
      --replace-fail "exec xdvi-xaw" "exec '$out/bin/xdvi-xaw'"
  '';
  # TODO: it's suspicious that mktexpk generates fonts into ~/.texlive2014
};
@@ -489,7 +489,7 @@ xindy = stdenv.mkDerivation {
  # hardcode clisp location
  postPatch = ''
    substituteInPlace xindy-*/user-commands/xindy.in \
      --replace "our \$clisp = ( \$is_windows ? 'clisp.exe' : 'clisp' ) ;" \
      --replace-fail "our \$clisp = ( \$is_windows ? 'clisp.exe' : 'clisp' ) ;" \
                     "our \$clisp = '$(type -P clisp)';"
  '';

+2 −2
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ let
    if [[ -e "$out/bin/mtxrun" ]]; then
      mv "$out"/bin/mtxrun.lua{,.orig}
      substitute "$TEXMFDIST"/scripts/context/lua/mtxrun.lua "$out"/bin/mtxrun.lua \
        --replace 'randomseed(math.initialseed)' "randomseed($SOURCE_DATE_EPOCH)"
        --replace-fail 'randomseed(math.initialseed)' "randomseed($SOURCE_DATE_EPOCH)"
    fi
  '' +
  # texlive postactions (see TeXLive::TLUtils::_do_postaction_script)
@@ -409,7 +409,7 @@ let
    # note that calling faketime and fmtutil is fragile (faketime uses LD_PRELOAD, fmtutil calls /bin/sh, causing potential glibc issues on non-NixOS)
    # so we patch fmtutil to use faketime, rather than calling faketime fmtutil
    substitute "$TEXMFDIST"/scripts/texlive/fmtutil.pl fmtutil \
      --replace 'my $cmdline = "$eng -ini ' 'my $cmdline = "faketime -f '"'"'\@1980-01-01 00:00:00 x0.001'"'"' $eng -ini '
      --replace-fail 'my $cmdline = "$eng -ini ' 'my $cmdline = "faketime -f '"'"'\@1980-01-01 00:00:00 x0.001'"'"' $eng -ini '
    FORCE_SOURCE_DATE=1 TZ= perl fmtutil --sys --all | grep '^fmtutil' # too verbose

    # Disable unavailable map files
+4 −4
Original line number Diff line number Diff line
@@ -44,12 +44,12 @@ let
  version = {
    # day of the snapshot being taken
    year = "2024";
    month = "01";
    day = "14";
    month = "03";
    day = "16";
    # TeX Live version
    texliveYear = 2023;
    # final (historic) release or snapshot
    final = false;
    final = true;
  };

  # The tarballs on CTAN mirrors for the current release are constantly
@@ -79,7 +79,7 @@ let
      # use last mirror for daily snapshots as texlive.tlpdb.xz changes every day
      # TODO make this less hacky
      (if version.final then mirrors else [ (lib.last mirrors) ]);
    hash = "sha256-eUG0KVfFPkjOczCsu2GAPRQcvcPrEIGqIsJNRc+AHDs=";
    hash = "sha256-w+04GBFDk/P/XvW7T9PotGD0nQslMkV9codca2urNK4=";
  };

  tlpdbNix = runCommand "tlpdb.nix" {
+278 −246

File changed.

Preview size limit exceeded, changes collapsed.

Loading