From c6ecb3887f2adb423939a058ff141ae4a82d7315 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Mon, 24 Dec 2018 05:46:51 -0600 Subject: [PATCH] pythonPackages.pytorch: fix weirdly broken wheel version number Otherwise, the wheel gets built with invalid metadata -- causing 'torch >= 1.0.0' to be unsatisfiable in other python packages, for instance. Signed-off-by: Austin Seipp --- pkgs/development/python-modules/pytorch/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix index d0aa2e59ffc..e65626e7787 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/pytorch/default.nix @@ -58,6 +58,12 @@ in buildPythonPackage rec { done ''; + # Override the (weirdly) wrong version set by default. See + # https://github.com/NixOS/nixpkgs/pull/52437#issuecomment-449718038 + # https://github.com/pytorch/pytorch/blob/v1.0.0/setup.py#L267 + PYTORCH_BUILD_VERSION = version; + PYTORCH_BUILD_NUMBER = 0; + buildInputs = [ cmake numpy.blas