@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetchurl, bison, flex, makeWrapper, texinfo, readline, texLive }:
1+{ lib, stdenv, fetchurl, bison, flex, makeWrapper, texinfo4, getopt, readline, texlive }:
22
33lib.fix (eukleides: stdenv.mkDerivation rec {
44 pname = "eukleides";
@@ -9,12 +9,16 @@ lib.fix (eukleides: stdenv.mkDerivation rec {
99 sha256 = "0s8cyh75hdj89v6kpm3z24i48yzpkr8qf0cwxbs9ijxj1i38ki0q";
1010 };
1111
12− # use $CC instead of hardcoded gcc
13− patches = [ ./use-CC.patch ];
12+ patches = [
13+ # use $CC instead of hardcoded gcc
14+ ./use-CC.patch
15+ # allow PostScript transparency in epstopdf call
16+ ./gs-allowpstransparency.patch
17+ ];
1418
15− nativeBuildInputs = [ bison flex texinfo makeWrapper ];
19+ nativeBuildInputs = [ bison flex texinfo4 makeWrapper ];
1620
17− buildInputs = [ readline texLive ];
21+ buildInputs = [ getopt readline ];
1822
1923 preConfigure = ''
2024 substituteInPlace Makefile \
@@ -34,19 +38,15 @@ lib.fix (eukleides: stdenv.mkDerivation rec {
3438
3539 postInstall = ''
3640 wrapProgram $out/bin/euktoeps \
37− --set-default TEXINPUTS : \
38− --prefix TEXINPUTS : "$tex/tex/latex/eukleides" \
39− --prefix PATH : "${texLive}/bin"
40− wrapProgram $out/bin/euktopdf \
41− --set-default TEXINPUTS : \
42− --prefix TEXINPUTS : "$tex/tex/latex/eukleides" \
43− --prefix PATH : "${texLive}/bin"
41+ --prefix PATH : ${lib.makeBinPath [ getopt ]}
4442 '';
4543
4644 outputs = [ "out" "doc" "tex" ];
4745
4846 passthru.tlType = "run";
49− passthru.pkgs = [ eukleides.tex ];
47+ passthru.pkgs = [ eukleides.tex ]
48+ # packages needed by euktoeps, euktopdf and eukleides.sty
49+ ++ (with texlive; collection-pstricks.pkgs ++ epstopdf.pkgs ++ iftex.pkgs ++ moreverb.pkgs);
5050
5151 meta = {
5252 description = "Geometry Drawing Language";