diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-03-21 00:02:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 00:02:05 +0000 |
commit | 6e6944dbcc2493731e7b82059189efe41b2f9646 (patch) | |
tree | f82aab0cfe3cce7c8b3de67dc56d124e3c86bbe7 /pkgs/tools/graphics | |
parent | 36232fff71d83ffd6df00c11c237f1fc478a4911 (diff) | |
parent | 71a5d2c832a3af02a649713d502515bd33acef4a (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r-- | pkgs/tools/graphics/asymptote/default.nix | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 30681663a7cee..aeb51d66bf6f0 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -1,6 +1,6 @@ -{ 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 ''; |