about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/science/math/cutensor/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science/math/cutensor/generic.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/cutensor/generic.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/math/cutensor/generic.nix b/nixpkgs/pkgs/development/libraries/science/math/cutensor/generic.nix
index e4cbf0ab7bf7..c957fcdd99d4 100644
--- a/nixpkgs/pkgs/development/libraries/science/math/cutensor/generic.nix
+++ b/nixpkgs/pkgs/development/libraries/science/math/cutensor/generic.nix
@@ -13,6 +13,7 @@
 let
   mostOfVersion = builtins.concatStringsSep "."
     (lib.take 3 (lib.versions.splitVersion version));
+  platform = "${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}";
 in
 
 stdenv.mkDerivation {
@@ -20,7 +21,9 @@ stdenv.mkDerivation {
   inherit version;
 
   src = fetchurl {
-    url = "https://developer.download.nvidia.com/compute/cutensor/${mostOfVersion}/local_installers/libcutensor-${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}-${version}.tar.gz";
+    url = if lib.versionOlder mostOfVersion "1.3.3"
+      then "https://developer.download.nvidia.com/compute/cutensor/${mostOfVersion}/local_installers/libcutensor-${platform}-${version}.tar.gz"
+      else "https://developer.download.nvidia.com/compute/cutensor/redist/libcutensor/${platform}/libcutensor-${platform}-${version}-archive.tar.xz";
     inherit hash;
   };