diff --git a/pkgs/development/python-modules/quantiphy/default.nix b/pkgs/development/python-modules/quantiphy/default.nix new file mode 100644 index 000000000000..bcc9b4d78a90 --- /dev/null +++ b/pkgs/development/python-modules/quantiphy/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flitBuildHook +, pytestCheckHook +, pythonOlder +, inform +, parametrize-from-file +, setuptools +, voluptuous +, quantiphy-eval +, rkm-codes +}: + +buildPythonPackage rec { + pname = "quantiphy"; + version = "2.18"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "KenKundert"; + repo = "quantiphy"; + rev = "v${version}"; + sha256 = "sha256-KXZQTal5EQDrMNV9QKeuLeYYDaMfAJlEDEagq2XG9/Q="; + }; + + format = "pyproject"; + nativeBuildInputs = [ + flitBuildHook + ]; + checkInputs = [ + inform + parametrize-from-file + pytestCheckHook + setuptools + voluptuous + ]; + propagatedBuildInputs = [ + quantiphy-eval + rkm-codes + ]; + + meta = with lib; { + description = "Module for physical quantities (numbers with units)"; + homepage = "https://quantiphy.readthedocs.io"; + license = licenses.mit; + maintainers = with maintainers; [ jpetrucciani ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 02cfba1f0ef3..78a2453e8205 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9589,6 +9589,8 @@ self: super: with self; { quantities = callPackage ../development/python-modules/quantities { }; + quantiphy = callPackage ../development/python-modules/quantiphy { }; + quantiphy-eval = callPackage ../development/python-modules/quantiphy-eval { }; quantum-gateway = callPackage ../development/python-modules/quantum-gateway { };