I’m trying to package jaxlib at the moment, and fetchPypi
. Here’s my simple derivation:
{ lib, fetchPypi, buildPythonPackage }:
buildPythonPackage rec {
version = "0.1.70";
pname = "jaxlib";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-4VU0aAoFts7ZLa3eMHvTsiB+/Rqq7DBOlhl7AK11YNM=";
};
}
But fetchPypi
isn’t happy when I attempt to build it:
❯ nix-build -A python3Packages.jaxlib
these 2 derivations will be built:
/nix/store/0wjpnyj64z9hgdmbi1sdig7vacs2616y-jaxlib-0.1.70.tar.gz.drv
/nix/store/imb09583y9vl4yk1l0rkxqdxpifgmd0k-python3.9-jaxlib-0.1.70.drv
building '/nix/store/0wjpnyj64z9hgdmbi1sdig7vacs2616y-jaxlib-0.1.70.tar.gz.drv'...
trying https://files.pythonhosted.org/packages/source/j/jaxlib/jaxlib-0.1.70.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
trying https://pypi.io/packages/source/j/jaxlib/jaxlib-0.1.70.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 122 100 122 0 0 1487 0 --:--:-- --:--:-- --:--:-- 1506
100 273 100 273 0 0 1358 0 --:--:-- --:--:-- --:--:-- 1358
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
error: cannot download jaxlib-0.1.70.tar.gz from any mirror
...
error: 1 dependencies of derivation '/nix/store/imb09583y9vl4yk1l0rkxqdxpifgmd0k-python3.9-jaxlib-0.1.70.drv' failed to build
I believe this is because jaxlib
does not have a source distribution on pypi, but only offers wheels (jaxlib · PyPI). How does one nix-ify a python package like this?