diff options
Diffstat (limited to 'pkgs/development/python-modules/libversion/default.nix')
-rw-r--r-- | pkgs/development/python-modules/libversion/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/libversion/default.nix b/pkgs/development/python-modules/libversion/default.nix index a492ea7806a0a..5fb33fa54774c 100644 --- a/pkgs/development/python-modules/libversion/default.nix +++ b/pkgs/development/python-modules/libversion/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , libversion , pkg-config +, pytestCheckHook , pythonOlder }: @@ -20,6 +21,11 @@ buildPythonPackage rec { sha256 = "sha256-p0wtSB+QXAERf+57MMb8cqWoy1bG3XaCpR9GPwYYvJM="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "'pkg-config'" "'$(command -v $PKG_CONFIG)'" + ''; + nativeBuildInputs = [ pkg-config ]; @@ -28,6 +34,15 @@ buildPythonPackage rec { libversion ]; + checkInputs = [ + pytestCheckHook + ]; + + preCheck = '' + # import from $out + rm -r libversion + ''; + pythonImportsCheck = [ "libversion" ]; |