Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, pythonSupport ? false 6, python3Packages 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "example-robot-data"; 11 version = "4.0.8"; 12 13 src = fetchFromGitHub { 14 owner = "Gepetto"; 15 repo = finalAttrs.pname; 16 rev = "v${finalAttrs.version}"; 17 fetchSubmodules = true; 18 hash = "sha256-xeNbx1f9QCAOJrXfkk3jo9XH2/4HNtnRA1OSnqA2cLs="; 19 }; 20 21 strictDeps = true; 22 23 nativeBuildInputs = [ 24 cmake 25 ]; 26 27 buildInputs = lib.optionals pythonSupport [ 28 python3Packages.pinocchio 29 ]; 30 31 cmakeFlags = lib.optionals (!pythonSupport) [ 32 "-DBUILD_PYTHON_INTERFACE=OFF" 33 ]; 34 35 doCheck = true; 36 # The package expect to find an `example-robot-data/robots` folder somewhere 37 # either in install prefix or in the sources 38 # where it can find the meshes for unit tests 39 preCheck = "ln -s source ../../${finalAttrs.pname}"; 40 pythonImportsCheck = [ 41 "example_robot_data" 42 ]; 43 44 meta = with lib; { 45 description = "Set of robot URDFs for benchmarking and developed examples."; 46 homepage = "https://github.com/Gepetto/example-robot-data"; 47 license = licenses.bsd3; 48 maintainers = with maintainers; [ nim65s wegank ]; 49 platforms = platforms.unix; 50 }; 51})