Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 58 lines 1.3 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, fetchpatch 5, cmake 6, example-robot-data 7, pinocchio 8, pythonSupport ? false 9, python3Packages 10}: 11 12stdenv.mkDerivation rec { 13 pname = "crocoddyl"; 14 version = "2.0.0"; 15 16 src = fetchFromGitHub { 17 owner = "loco-3d"; 18 repo = pname; 19 rev = "v${version}"; 20 fetchSubmodules = true; 21 hash = "sha256-wDHCHTJXmJjU7mhQ2huUVdEc9ap7PMeqlHPrKm//jBQ="; 22 }; 23 24 patches = [ 25 # error: no matching function for call to 'max(double&, int)' 26 (fetchpatch { 27 url = "https://github.com/loco-3d/crocoddyl/commit/d2e4116257595317740975e745739bb76b92e5c0.patch"; 28 hash = "sha256-M79jNdIxzx9PfW3TStRny76dVo/HDf/Rp08ZPx+ymBg"; 29 }) 30 ]; 31 32 strictDeps = true; 33 34 nativeBuildInputs = [ 35 cmake 36 ]; 37 38 propagatedBuildInputs = lib.optionals (!pythonSupport) [ 39 example-robot-data 40 pinocchio 41 ] ++ lib.optionals pythonSupport [ 42 python3Packages.example-robot-data 43 python3Packages.pinocchio 44 ]; 45 46 cmakeFlags = lib.optionals (!pythonSupport) [ 47 "-DBUILD_EXAMPLES=OFF" 48 "-DBUILD_PYTHON_INTERFACE=OFF" 49 ]; 50 51 meta = with lib; { 52 description = "Crocoddyl optimal control library"; 53 homepage = "https://github.com/loco-3d/crocoddyl"; 54 license = licenses.bsd3; 55 maintainers = with maintainers; [ wegank ]; 56 platforms = platforms.unix; 57 }; 58}