diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-23 08:16:49 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-23 08:16:49 +0000 |
commit | 4dc730a187d41f9f2dce4fe2680c32dcecb79b93 (patch) | |
tree | 67673deb1649dc0a40962e70e6da302d7b6c4bf0 /nixpkgs/pkgs/applications/science/math | |
parent | 633cab0ecb07627706c6b523e219490f019eaab5 (diff) | |
parent | 7e567a3d092b7de69cdf5deaeb8d9526de230916 (diff) | |
download | nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.gz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.bz2 nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.lz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.xz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.zst nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.zip |
Merge commit '7e567a3d092b7de69cdf5deaeb8d9526de230916'
# Conflicts: # nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math')
3 files changed, 33 insertions, 30 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"; diff --git a/nixpkgs/pkgs/applications/science/math/eukleides/gs-allowpstransparency.patch b/nixpkgs/pkgs/applications/science/math/eukleides/gs-allowpstransparency.patch new file mode 100644 index 000000000000..aa92e6cc9fa7 --- /dev/null +++ b/nixpkgs/pkgs/applications/science/math/eukleides/gs-allowpstransparency.patch @@ -0,0 +1,10 @@ +--- a/bash/euktopdf ++++ b/bash/euktopdf +@@ -55,6 +55,6 @@ do + exit 1 + fi + dvips -q -E -o $base.eps $base.dvi && +- epstopdf $base.eps && ++ epstopdf --gsopt=-dALLOWPSTRANSPARENCY $base.eps && + rm -f $base.{tex,log,dvi,eps} + done diff --git a/nixpkgs/pkgs/applications/science/math/gurobi/default.nix b/nixpkgs/pkgs/applications/science/math/gurobi/default.nix index 2bfeaa005687..91ee7c1c65e0 100644 --- a/nixpkgs/pkgs/applications/science/math/gurobi/default.nix +++ b/nixpkgs/pkgs/applications/science/math/gurobi/default.nix @@ -1,35 +1,28 @@ -{ stdenv, lib, fetchurl, autoPatchelfHook, python2 }: +{ stdenv, lib, fetchurl, autoPatchelfHook, python3 }: -let - majorVersion = "8.1"; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "gurobi"; - version = "${majorVersion}.0"; + version = "9.1.2"; - src = with lib; fetchurl { - url = "http://packages.gurobi.com/${versions.majorMinor version}/gurobi${version}_linux64.tar.gz"; - sha256 = "1yjqbzqnq4jjkjm616d36bgd3rmqr0a1ii17n0prpdjzmdlq63dz"; + src = fetchurl { + url = "https://packages.gurobi.com/${lib.versions.majorMinor version}/gurobi${version}_linux64.tar.gz"; + sha256 = "7f60bd675f79476bb2b32cd632aa1d470f8246f2b033b7652d8de86f6e7e429b"; }; sourceRoot = "gurobi${builtins.replaceStrings ["."] [""] version}/linux64"; nativeBuildInputs = [ autoPatchelfHook ]; - buildInputs = [ (python2.withPackages (ps: [ ps.gurobipy ])) ]; + buildInputs = [ (python3.withPackages (ps: [ ps.gurobipy ])) ]; strictDeps = true; - buildPhase = '' - cd src/build - make - cd ../.. - ''; + makeFlags = [ "--directory=src/build" ]; installPhase = '' mkdir -p $out/bin cp bin/* $out/bin/ - rm $out/bin/gurobi.env rm $out/bin/gurobi.sh - rm $out/bin/python2.7 + rm $out/bin/python* cp lib/gurobi.py $out/bin/gurobi.sh @@ -48,7 +41,7 @@ in stdenv.mkDerivation rec { ln -s $out/lib/gurobi-javadoc.jar $out/share/java/ ''; - passthru.libSuffix = lib.replaceStrings ["."] [""] majorVersion; + passthru.libSuffix = lib.replaceStrings [ "." ] [ "" ] (lib.versions.majorMinor version); meta = with lib; { description = "Optimization solver for mathematical programming"; |