diff options
author | Katharina Fey <kookie@spacekookie.de> | 2019-10-18 16:32:00 +0000 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2019-10-18 16:32:00 +0000 |
commit | 0f74f62ee25ac2d21bd67c29b8efc3ad079a72a8 (patch) | |
tree | bd701e982d896952f4291e4b795c85bb581593b8 /nixpkgs/pkgs/development/libraries/science/math | |
parent | dae1ae41b3a575e87d411e0cd9daa42a85c5aa89 (diff) | |
parent | 1c40ee6fc44f7eb474c69ea070a43247a1a2c83c (diff) |
Merge commit '1c40ee6fc44f7eb474c69ea070a43247a1a2c83c'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science/math')
6 files changed, 32 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/math/cudnn/generic.nix b/nixpkgs/pkgs/development/libraries/science/math/cudnn/generic.nix index f0f5829ce46..5a17e807bd4 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/cudnn/generic.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/cudnn/generic.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation { passthru = { inherit cudatoolkit; - majorVersion = lib.head (lib.splitString "." version); + majorVersion = lib.versions.major version; }; meta = with stdenv.lib; { diff --git a/nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch b/nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch index f55bbe3f24f..5c22cf0b84e 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch +++ b/nixpkgs/pkgs/development/libraries/science/math/lcalc/makefile.patch @@ -104,10 +104,10 @@ index 84e4e88..56ca676 100644 - cp -rf ../include $(INSTALL_DIR)/include/Lfunction + install -d $(INSTALL_DIR)/bin + install -d $(INSTALL_DIR)/$(LIB_DIR) -+ install -d $(INSTALL_DIR)/include/libLfunction ++ install -d $(INSTALL_DIR)/include/Lfunction + install lcalc $(INSTALL_DIR)/bin + install libLfunction.so $(INSTALL_DIR)/$(LIB_DIR) -+ install -m 644 -t $(INSTALL_DIR)/include/libLfunction ../include/*.h ++ install -m 644 -t $(INSTALL_DIR)/include/Lfunction ../include/*.h SRCS = Lcommandline.cc Lcommandline_elliptic.cc Lcommandline_globals.cc Lcommandline_misc.cc Lcommandline_numbertheory.cc Lcommandline_twist.cc Lcommandline_values_zeros.cc Lgamma.cc Lglobals.cc Lmisc.cc Lriemannsiegel.cc Lriemannsiegel_blfi.cc cmdline.c diff --git a/nixpkgs/pkgs/development/libraries/science/math/or-tools/build.patch b/nixpkgs/pkgs/development/libraries/science/math/or-tools/build.patch new file mode 100644 index 00000000000..a67e137ff4a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/science/math/or-tools/build.patch @@ -0,0 +1,5 @@ +--- a/makefiles/Makefile.python.mk ++++ b/makefiles/Makefile.python.mk +@@ -1070 +1070 @@ $(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools/data: $(PYDATA_LIBS) | $(PYPI_ARCHIVE_T +-$(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools/util: $(PYUTIL_LIBS) | $(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools ++$(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools/util: $(PYSORTED_INTERVAL_LIST_LIBS) | $(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools diff --git a/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix b/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix index c6e065320a2..224f4239a22 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix @@ -5,15 +5,20 @@ stdenv.mkDerivation rec { pname = "or-tools"; - version = "v7.0"; + version = "7.3"; src = fetchFromGitHub { owner = "google"; repo = "or-tools"; - rev = version; - sha256 = "09rs2j3w4ljw9qhhnsjlvfii297njjszwvkbgj1i6kns3wnlr7cp"; + rev = "v${version}"; + sha256 = "0q06vxmds6nm3dpjw4y5jzr8j98qgfb9i8pbm9pfhmqigv791hwc"; }; + patches = [ + ./build.patch # https://github.com/google/or-tools/pull/1619 + ./protobuf.patch # Otherwise it tries to install protobuf from pypi. + ]; + # The original build system uses cmake which does things like pull # in dependencies through git and Makefile creation time. We # obviously don't want to do this so instead we provide the diff --git a/nixpkgs/pkgs/development/libraries/science/math/or-tools/protobuf.patch b/nixpkgs/pkgs/development/libraries/science/math/or-tools/protobuf.patch new file mode 100644 index 00000000000..b0cce40434c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/science/math/or-tools/protobuf.patch @@ -0,0 +1,10 @@ +--- a/makefiles/Makefile.third_party.unix.mk ++++ b/makefiles/Makefile.third_party.unix.mk +@@ -24,1 +24,1 @@ GLOG_TAG = 0.4.0 +-PROTOBUF_TAG = 3.9.0 ++PROTOBUF_TAG = 3.7.0 +--- a/makefiles/Makefile.third_party.win.mk ++++ b/makefiles/Makefile.third_party.win.mk +@@ -40 +40 @@ GLOG_TAG = 0.4.0 +-PROTOBUF_TAG = 3.9.0 ++PROTOBUF_TAG = 3.7.0 diff --git a/nixpkgs/pkgs/development/libraries/science/math/tensorflow/bin.nix b/nixpkgs/pkgs/development/libraries/science/math/tensorflow/bin.nix index 3db7a6f1d1e..f9f300883a1 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/tensorflow/bin.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/tensorflow/bin.nix @@ -1,6 +1,6 @@ { stdenv , fetchurl -, patchelf +, addOpenGLRunpath , cudaSupport ? false, symlinkJoin, cudatoolkit, cudnn, nvidia_x11 }: @@ -35,6 +35,9 @@ let else '' patchelf --set-rpath "${rpath}:$out/lib" $out/lib/libtensorflow.so patchelf --set-rpath "${rpath}" $out/lib/libtensorflow_framework.so + ${optionalString cudaSupport '' + addOpenGLRunpath $out/lib/libtensorflow.so $out/lib/libtensorflow_framework.so + ''} ''; in stdenv.mkDerivation rec { @@ -43,6 +46,8 @@ in stdenv.mkDerivation rec { src = fetchurl url; + nativeBuildInputs = optional cudaSupport addOpenGLRunpath; + # Patch library to use our libc, libstdc++ and others buildCommand = '' mkdir -pv $out |