summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincenzo Mantova <1962985+xworld21@users.noreply.github.com>2023-06-26 22:09:19 +0100
committerVincenzo Mantova <1962985+xworld21@users.noreply.github.com>2023-06-26 22:09:19 +0100
commitba1db967e7f554d2600fb1a0ceef05b992af9723 (patch)
tree2d8d1a5e15d214c025da9157b887b60c1ded54c3
parent640d4e204d62b55fe37883cbabf2ccc6f4b86c0e (diff)
downloadnixpkgs-ba1db967e7f554d2600fb1a0ceef05b992af9723.tar
nixpkgs-ba1db967e7f554d2600fb1a0ceef05b992af9723.tar.gz
nixpkgs-ba1db967e7f554d2600fb1a0ceef05b992af9723.tar.bz2
nixpkgs-ba1db967e7f554d2600fb1a0ceef05b992af9723.tar.lz
nixpkgs-ba1db967e7f554d2600fb1a0ceef05b992af9723.tar.xz
nixpkgs-ba1db967e7f554d2600fb1a0ceef05b992af9723.tar.zst
nixpkgs-ba1db967e7f554d2600fb1a0ceef05b992af9723.zip
asymptote: add Qt5 libraries and wrapper for xasy
-rw-r--r--pkgs/tools/graphics/asymptote/default.nix12
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix
index 38edd3050e8..c3dfe639f95 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 29600cc5848..cc7a8741418 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; };
   };