Merge pull request #278528 from trofi/python3Packages.paddlepaddle-fix-src-eval

python3Packages.paddlepaddle: improve `src` eval error
This commit is contained in:
Mario Rodas 2024-01-12 17:56:02 -05:00 committed by GitHub
commit ccea0bb46a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,8 +28,10 @@ let
version = "2.5.0";
format = "wheel";
pyShortVersion = "cp${builtins.replaceStrings ["."] [""] python.pythonVersion}";
cpuOrGpu = if cudaSupport then "gpu" else "cpu";
allHashAndPlatform = import ./binary-hashes.nix;
hash = allHashAndPlatform."${stdenv.system}"."${if cudaSupport then "gpu" else "cpu"}"."${pyShortVersion}";
hash = allHashAndPlatform."${stdenv.system}"."${cpuOrGpu}"."${pyShortVersion}"
or (throw "${pname} has no binary-hashes.nix entry for '${stdenv.system}.${cpuOrGpu}.${pyShortVersion}' attribute");
platform = allHashAndPlatform."${stdenv.system}".platform;
src = fetchPypi ({
inherit version format hash platform;