diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/linear-operator/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/linear-operator/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/linear-operator/default.nix b/nixpkgs/pkgs/development/python-modules/linear-operator/default.nix new file mode 100644 index 000000000000..7bd1f6245343 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/linear-operator/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, jaxtyping +, pytestCheckHook +, scipy +, setuptools +, setuptools-scm +, torch +, wheel +}: + +buildPythonPackage rec { + pname = "linear-operator"; + version = "0.5.2"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "cornellius-gp"; + repo = "linear_operator"; + rev = "refs/tags/v${version}"; + hash = "sha256-OuE6jx9Q4IU+b2a+mrglRdBOReN1tt/thetNXxwk1GI="; + }; + + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools + setuptools-scm + wheel + ]; + + propagatedBuildInputs = [ + jaxtyping + scipy + torch + ]; + + pythonImportsCheck = [ "linear_operator" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # flaky numerical tests + "test_svd" + ]; + + meta = with lib; { + description = "A LinearOperator implementation to wrap the numerical nuts and bolts of GPyTorch"; + homepage = "https://github.com/cornellius-gp/linear_operator/"; + license = licenses.mit; + maintainers = with maintainers; [ veprbl ]; + }; +} |