From ba1db967e7f554d2600fb1a0ceef05b992af9723 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> Date: Mon, 26 Jun 2023 22:09:19 +0100 Subject: [PATCH] asymptote: add Qt5 libraries and wrapper for xasy --- pkgs/tools/graphics/asymptote/default.nix | 12 +++++++++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 38edd3050e83..c3dfe639f95c 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -1,8 +1,8 @@ { lib, stdenv, fetchFromGitHub, fetchurl, fetchpatch -, autoreconfHook, bison, glm, flex +, autoreconfHook, bison, glm, flex, wrapQtAppsHook , freeglut, ghostscriptX, imagemagick, fftw , boehmgc, libGLU, libGL, mesa, ncurses, readline, gsl, libsigsegv -, python3 +, python3, qtbase, qtsvg , zlib, perl, curl , texLive, texinfo , darwin @@ -25,12 +25,13 @@ stdenv.mkDerivation rec { flex bison texinfo + wrapQtAppsHook ]; buildInputs = [ ghostscriptX imagemagick fftw boehmgc ncurses readline gsl libsigsegv - zlib perl curl + zlib perl curl qtbase qtsvg texLive (python3.withPackages (ps: with ps; [ cson numpy pyqt5 ])) ]; @@ -43,6 +44,8 @@ stdenv.mkDerivation rec { OpenGL GLUT Cocoa ]); + dontWrapQtApps = true; + preConfigure = '' HOME=$TMP ''; @@ -55,6 +58,9 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc"; postInstall = '' + 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 29600cc58489..cc7a87414182 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3014,7 +3014,7 @@ with pkgs; astc-encoder = callPackage ../tools/graphics/astc-encoder { }; - asymptote = callPackage ../tools/graphics/asymptote { + asymptote = libsForQt5.callPackage ../tools/graphics/asymptote { texLive = texlive.combine { inherit (texlive) scheme-small epsf cm-super texinfo media9 ocgx2 collection-latexextra; }; };