evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ex / example-robot-data / package.nix
blob63331bbf5a8499f4c898b1c4369a11556de64ac5
2   cmake,
3   doxygen,
4   fetchFromGitHub,
5   fetchpatch,
6   lib,
7   pkg-config,
8   pythonSupport ? false,
9   python3Packages,
10   stdenv,
13 stdenv.mkDerivation (finalAttrs: {
14   pname = "example-robot-data";
15   version = "4.1.0";
17   src = fetchFromGitHub {
18     owner = "Gepetto";
19     repo = "example-robot-data";
20     rev = "v${finalAttrs.version}";
21     fetchSubmodules = true;
22     hash = "sha256-Heq+c8SSYNO8ksTv5FphRBRStlTakm9T66jlPXon5tI=";
23   };
25   outputs = [
26     "out"
27     "doc"
28   ];
30   strictDeps = true;
32   patches = [
33     # Temporary patch for pinocchio v3.0.0 compatibility.
34     # Should be removed on next example-robot-data release
35     (fetchpatch {
36       name = "pin3.patch";
37       url = "https://github.com/Gepetto/example-robot-data/pull/217/commits/a605ceec857005cde153ec5895e227205eb7a5c3.patch";
38       hash = "sha256-cvAWFytrU2XVggo/nCg8cuLcaZBTACXg6LxjL/6YMPs=";
39     })
40   ];
42   nativeBuildInputs =
43     [
44       cmake
45       doxygen
46       pkg-config
47     ]
48     ++ lib.optionals pythonSupport [
49       python3Packages.python
50       python3Packages.pythonImportsCheckHook
51     ];
53   propagatedBuildInputs = lib.optionals pythonSupport [ python3Packages.pinocchio ];
55   cmakeFlags = [ (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport) ];
57   doCheck = true;
58   # The package expect to find an `example-robot-data/robots` folder somewhere
59   # either in install prefix or in the sources
60   # where it can find the meshes for unit tests
61   preCheck = "ln -s source ../../${finalAttrs.pname}";
62   pythonImportsCheck = [ "example_robot_data" ];
64   meta = with lib; {
65     description = "Set of robot URDFs for benchmarking and developed examples";
66     homepage = "https://github.com/Gepetto/example-robot-data";
67     license = licenses.bsd3;
68     maintainers = with maintainers; [
69       nim65s
70       wegank
71     ];
72     platforms = platforms.unix;
73   };