about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/eukleides/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/eukleides/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/science/math/eukleides/default.nix26
1 files changed, 13 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/eukleides/default.nix b/nixpkgs/pkgs/applications/science/math/eukleides/default.nix
index b5a9fc3fa86d..6b6bfd7d6e5f 100644
--- a/nixpkgs/pkgs/applications/science/math/eukleides/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/eukleides/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, bison, flex, makeWrapper, texinfo, readline, texLive }:
+{ lib, stdenv, fetchurl, bison, flex, makeWrapper, texinfo4, getopt, readline, texlive }:
 
 lib.fix (eukleides: stdenv.mkDerivation rec {
   pname = "eukleides";
@@ -9,12 +9,16 @@ lib.fix (eukleides: stdenv.mkDerivation rec {
     sha256 = "0s8cyh75hdj89v6kpm3z24i48yzpkr8qf0cwxbs9ijxj1i38ki0q";
   };
 
-  # use $CC instead of hardcoded gcc
-  patches = [ ./use-CC.patch ];
+  patches = [
+    # use $CC instead of hardcoded gcc
+    ./use-CC.patch
+    # allow PostScript transparency in epstopdf call
+    ./gs-allowpstransparency.patch
+  ];
 
-  nativeBuildInputs = [ bison flex texinfo makeWrapper ];
+  nativeBuildInputs = [ bison flex texinfo4 makeWrapper ];
 
-  buildInputs = [ readline texLive ];
+  buildInputs = [ getopt readline ];
 
   preConfigure = ''
     substituteInPlace Makefile \
@@ -34,19 +38,15 @@ lib.fix (eukleides: stdenv.mkDerivation rec {
 
   postInstall = ''
     wrapProgram $out/bin/euktoeps \
-      --set-default TEXINPUTS : \
-      --prefix TEXINPUTS : "$tex/tex/latex/eukleides" \
-      --prefix PATH : "${texLive}/bin"
-    wrapProgram $out/bin/euktopdf \
-      --set-default TEXINPUTS : \
-      --prefix TEXINPUTS : "$tex/tex/latex/eukleides" \
-      --prefix PATH : "${texLive}/bin"
+      --prefix PATH : ${lib.makeBinPath [ getopt ]}
   '';
 
   outputs = [ "out" "doc" "tex" ];
 
   passthru.tlType = "run";
-  passthru.pkgs = [ eukleides.tex ];
+  passthru.pkgs = [ eukleides.tex ]
+    # packages needed by euktoeps, euktopdf and eukleides.sty
+    ++ (with texlive; collection-pstricks.pkgs ++ epstopdf.pkgs ++ iftex.pkgs ++ moreverb.pkgs);
 
   meta = {
     description = "Geometry Drawing Language";