about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pynvml/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pynvml/default.nix')
-rw-r--r--pkgs/development/python-modules/pynvml/default.nix33
1 files changed, 21 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/pynvml/default.nix b/pkgs/development/python-modules/pynvml/default.nix
index f73f5bd7d56df..a115cd723998f 100644
--- a/pkgs/development/python-modules/pynvml/default.nix
+++ b/pkgs/development/python-modules/pynvml/default.nix
@@ -1,11 +1,13 @@
-{ lib
-, buildPythonPackage
-, fetchFromGitHub
-, substituteAll
-, pythonOlder
-, addOpenGLRunpath
-, setuptools
-, pytestCheckHook
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  substituteAll,
+  pythonOlder,
+  addOpenGLRunpath,
+  setuptools,
+  pytestCheckHook,
+  versioneer,
 }:
 
 buildPythonPackage rec {
@@ -28,16 +30,23 @@ buildPythonPackage rec {
     })
   ];
 
+  # unvendor versioneer
+  postPatch = ''
+    rm versioneer.py
+  '';
+
   nativeBuildInputs = [
     setuptools
+    versioneer
   ];
 
-  pythonImportsCheck = [ "pynvml" "pynvml.smi" ];
-
-  nativeCheckInputs = [
-    pytestCheckHook
+  pythonImportsCheck = [
+    "pynvml"
+    "pynvml.smi"
   ];
 
+  nativeCheckInputs = [ pytestCheckHook ];
+
   # OSError: /run/opengl-driver/lib/libnvidia-ml.so.1: cannot open shared object file: No such file or directory
   doCheck = false;