about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/crocoddyl/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/crocoddyl/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/crocoddyl/default.nix37
1 files changed, 22 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/libraries/crocoddyl/default.nix b/nixpkgs/pkgs/development/libraries/crocoddyl/default.nix
index 877296334fe4..a25ca5b97dff 100644
--- a/nixpkgs/pkgs/development/libraries/crocoddyl/default.nix
+++ b/nixpkgs/pkgs/development/libraries/crocoddyl/default.nix
@@ -9,26 +9,18 @@
 , python3Packages
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "crocoddyl";
-  version = "2.0.0";
+  version = "2.0.1";
 
   src = fetchFromGitHub {
     owner = "loco-3d";
-    repo = pname;
-    rev = "v${version}";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
     fetchSubmodules = true;
-    hash = "sha256-wDHCHTJXmJjU7mhQ2huUVdEc9ap7PMeqlHPrKm//jBQ=";
+    hash = "sha256-h7rzLSvmWOZCP8rvmUEhFeMEiPhojfbvkt+fNKpgoXo=";
   };
 
-  patches = [
-    # error: no matching function for call to 'max(double&, int)'
-    (fetchpatch {
-      url = "https://github.com/loco-3d/crocoddyl/commit/d2e4116257595317740975e745739bb76b92e5c0.patch";
-      hash = "sha256-M79jNdIxzx9PfW3TStRny76dVo/HDf/Rp08ZPx+ymBg";
-    })
-  ];
-
   strictDeps = true;
 
   nativeBuildInputs = [
@@ -48,11 +40,26 @@ stdenv.mkDerivation rec {
     "-DBUILD_PYTHON_INTERFACE=OFF"
   ];
 
+  prePatch = ''
+    substituteInPlace \
+      examples/CMakeLists.txt \
+      examples/log/check_logfiles.sh \
+      --replace /bin/bash ${stdenv.shell}
+  '';
+
+  doCheck = true;
+  pythonImportsCheck = [
+    "crocoddyl"
+  ];
+  checkInputs = lib.optionals (pythonSupport) [
+    python3Packages.scipy
+  ];
+
   meta = with lib; {
     description = "Crocoddyl optimal control library";
     homepage = "https://github.com/loco-3d/crocoddyl";
     license = licenses.bsd3;
-    maintainers = with maintainers; [ wegank ];
+    maintainers = with maintainers; [ nim65s wegank ];
     platforms = platforms.unix;
   };
-}
+})