From 4222b8c20c7b012c1a341e7ffdeb142d1bb92385 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 2 Feb 2016 16:53:49 +0300 Subject: [PATCH 1/2] asymptote: enable parallel building --- pkgs/tools/graphics/asymptote/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index 7a15b00b365f..e4242f8efabe 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -22,9 +22,11 @@ in stdenv.mkDerivation { inherit (s) name version; inherit buildInputs; + src = fetchurl { inherit (s) url sha256; }; + preConfigure = '' export HOME="$PWD" patchShebangs . @@ -33,12 +35,16 @@ stdenv.mkDerivation { cp texinfo-*/doc/texinfo.tex doc/ export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${boehmgc}/include/gc" ''; + postInstall = '' mv -v "$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 $out/share/info/dir ''; + + enableParallelBuilding = true; + meta = { inherit (s) version; description = "A tool for programming graphics intended to replace Metapost"; From 3ab8f9720124b4b305f6552d3c746a80c58d0dec Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 2 Feb 2016 17:18:41 +0300 Subject: [PATCH 2/2] asymptote: enforce no bundled libraries, install tex files, offscreen rendering support --- pkgs/tools/graphics/asymptote/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix index e4242f8efabe..9199d6a038f0 100644 --- a/pkgs/tools/graphics/asymptote/default.nix +++ b/pkgs/tools/graphics/asymptote/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl , freeglut, ghostscriptX, imagemagick, fftw - , boehmgc, mesa, ncurses, readline, gsl, libsigsegv + , boehmgc, mesa_glu, mesa_noglu, ncurses, readline, gsl, libsigsegv , python, zlib, perl, texLive, texinfo, xz }: let @@ -15,7 +15,7 @@ let }; buildInputs = [ freeglut ghostscriptX imagemagick fftw - boehmgc mesa ncurses readline gsl libsigsegv + boehmgc mesa_glu mesa_noglu mesa_noglu.osmesa ncurses readline gsl libsigsegv python zlib perl texLive texinfo xz ]; in @@ -33,9 +33,12 @@ stdenv.mkDerivation { sed -e 's@epswrite@eps2write@g' -i runlabel.in xz -d < ${texinfo.src} | tar --wildcards -x texinfo-'*'/doc/texinfo.tex cp texinfo-*/doc/texinfo.tex doc/ - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${boehmgc}/include/gc" + rm *.tar.gz + configureFlags="$configureFlags --with-latex=$out/share/texmf/tex/latex --with-context=$out/share/texmf/tex/context/third" ''; + NIX_CFLAGS_COMPILE = [ "-I${boehmgc}/include/gc" ]; + postInstall = '' mv -v "$out/share/info/asymptote/"*.info $out/share/info/ sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info