about summary refs log tree commit diff
path: root/pkgs/by-name/ts/tsid/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ts/tsid/package.nix')
-rw-r--r--pkgs/by-name/ts/tsid/package.nix24
1 files changed, 13 insertions, 11 deletions
diff --git a/pkgs/by-name/ts/tsid/package.nix b/pkgs/by-name/ts/tsid/package.nix
index 054857f8b222..0bd4b08b6025 100644
--- a/pkgs/by-name/ts/tsid/package.nix
+++ b/pkgs/by-name/ts/tsid/package.nix
@@ -32,15 +32,20 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   outputs = [
-    "doc"
     "out"
+    "doc"
   ];
 
-  nativeBuildInputs = [
-    doxygen
-    cmake
-    pkg-config
-  ] ++ lib.optional pythonSupport python3Packages.python;
+  nativeBuildInputs =
+    [
+      doxygen
+      cmake
+      pkg-config
+    ]
+    ++ lib.optionals pythonSupport [
+      python3Packages.python
+      python3Packages.pythonImportsCheckHook
+    ];
 
   propagatedBuildInputs =
     [
@@ -51,16 +56,13 @@ stdenv.mkDerivation (finalAttrs: {
     ++ lib.optional (!pythonSupport) pinocchio ++ lib.optional pythonSupport python3Packages.pinocchio;
 
   doCheck = true;
-  # pythonImportsCheck, but in stdenv.mkDerivation
-  postInstall = lib.optionalString pythonSupport ''
-    PYTHONPATH=$out/${python3Packages.python.sitePackages}:$PYTHONPATH
-    python -c "import tsid"
-  '';
+  pythonImportsCheck = [ "tsid" ];
 
   meta = {
     description = "Efficient Task Space Inverse Dynamics (TSID) based on Pinocchio";
     homepage = "https://github.com/stack-of-tasks/tsid";
     license = lib.licenses.bsd2;
     maintainers = with lib.maintainers; [ nim65s ];
+    platforms = lib.platforms.unix;
   };
 })