summary refs log tree commit diff
path: root/pkgs/development/libraries/onnxruntime/default.nix
diff options
context:
space:
mode:
authorDaniel Nagy <danielnagy@posteo.de>2022-12-26 14:45:00 +0100
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2022-12-31 12:13:22 +0100
commitd6ec92f8bf9461d83441e2d230906ef1f7582afd (patch)
treefda30a7d40c3dec60397785b959dfc7e9055c07c /pkgs/development/libraries/onnxruntime/default.nix
parent180a5d76c60c2782ed73a37b15c2bc8751e15292 (diff)
downloadnixpkgs-d6ec92f8bf9461d83441e2d230906ef1f7582afd.tar
nixpkgs-d6ec92f8bf9461d83441e2d230906ef1f7582afd.tar.gz
nixpkgs-d6ec92f8bf9461d83441e2d230906ef1f7582afd.tar.bz2
nixpkgs-d6ec92f8bf9461d83441e2d230906ef1f7582afd.tar.lz
nixpkgs-d6ec92f8bf9461d83441e2d230906ef1f7582afd.tar.xz
nixpkgs-d6ec92f8bf9461d83441e2d230906ef1f7582afd.tar.zst
nixpkgs-d6ec92f8bf9461d83441e2d230906ef1f7582afd.zip
onnxruntime: 1.12.1 -> 1.13.1
Diffstat (limited to 'pkgs/development/libraries/onnxruntime/default.nix')
-rw-r--r--pkgs/development/libraries/onnxruntime/default.nix24
1 files changed, 8 insertions, 16 deletions
diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix
index 48da747c302..f0189929003 100644
--- a/pkgs/development/libraries/onnxruntime/default.nix
+++ b/pkgs/development/libraries/onnxruntime/default.nix
@@ -14,6 +14,7 @@
 , nlohmann_json
 , boost
 , oneDNN
+, abseil-cpp_202111
 , gtest
 , pythonSupport ? false
 , nsync
@@ -27,23 +28,15 @@
 
 assert pythonSupport -> lib.versionOlder protobuf.version "3.20";
 
-let
-  # prefetch abseil
-  # Note: keep URL in sync with `cmake/external/abseil-cpp.cmake`
-  abseil = fetchurl {
-    url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.zip";
-    sha256 = "sha256-pFZ/8C+spnG5XjHTFbqxi0K2xvGmDpHG6oTlohQhEsI=";
-  };
-in
 stdenv.mkDerivation rec {
   pname = "onnxruntime";
-  version = "1.12.1";
+  version = "1.13.1";
 
   src = fetchFromGitHub {
     owner = "microsoft";
     repo = "onnxruntime";
     rev = "v${version}";
-    sha256 = "sha256-wwllEemiHTp9aJcCd1gsTS4WUVMp5wW+4i/+6DzmAeM=";
+    sha256 = "sha256-paaeq6QeiOzwiibbz0GkYZxEI/V80lvYNYTm6AuyAXQ=";
     fetchSubmodules = true;
   };
 
@@ -51,8 +44,8 @@ stdenv.mkDerivation rec {
     # Use dnnl from nixpkgs instead of submodules
     (fetchpatch {
       name = "system-dnnl.patch";
-      url = "https://aur.archlinux.org/cgit/aur.git/plain/system-dnnl.diff?h=python-onnxruntime&id=0185531906bda3a9aba93bbb0f3dcfeb0ae671ad";
-      sha256 = "sha256-58RBrQnAWNtc/1pmFs+PkZ6qCsL1LfMY3P0exMKzotA=";
+      url = "https://aur.archlinux.org/cgit/aur.git/plain/system-dnnl.diff?h=python-onnxruntime&id=9c392fb542979981fe0026e0fe3cc361a5f00a36";
+      sha256 = "sha256-+kedzJHLFU1vMbKO9cn8fr+9A5+IxIuiqzOfR2AfJ0k=";
     })
   ];
 
@@ -80,6 +73,7 @@ stdenv.mkDerivation rec {
     nsync
     python3Packages.numpy
     python3Packages.pybind11
+    python3Packages.packaging
   ];
 
   # TODO: build server, and move .so's to lib output
@@ -98,6 +92,7 @@ stdenv.mkDerivation rec {
     "-Donnxruntime_USE_PREINSTALLED_EIGEN=ON"
     "-Donnxruntime_USE_MPI=ON"
     "-Deigen_SOURCE_PATH=${eigen.src}"
+    "-DFETCHCONTENT_SOURCE_DIR_ABSEIL_CPP=${abseil-cpp_202111.src}"
     "-Donnxruntime_USE_DNNL=YES"
   ] ++ lib.optionals pythonSupport [
     "-Donnxruntime_ENABLE_PYTHON=ON"
@@ -106,15 +101,12 @@ stdenv.mkDerivation rec {
   doCheck = true;
 
   postPatch = ''
-    substituteInPlace cmake/external/abseil-cpp.cmake \
-      --replace "${abseil.url}" "${abseil}"
-
     substituteInPlace cmake/libonnxruntime.pc.cmake.in \
       --replace '$'{prefix}/@CMAKE_INSTALL_ @CMAKE_INSTALL_
   '';
 
   postBuild = lib.optionalString pythonSupport ''
-    ${python3Packages.python.interpreter} ../setup.py bdist_wheel
+    python ../setup.py bdist_wheel
   '';
 
   postInstall = ''