summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/eigenpy/default.nix
blob: 9edac97dd23f0afe5278df71cd5f1b24cb434051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
  lib,

  buildPythonPackage,
  fetchFromGitHub,
  writableTmpDirAsHomeHook,
  fontconfig,

  # nativeBuildInputs
  cmake,
  doxygen,
  graphviz,
  pkg-config,
  scipy,

  # buildInputs
  boost,

  # propagatedBuildInputs
  eigen,
  jrl-cmakemodules,
  numpy,
}:

buildPythonPackage rec {
  pname = "eigenpy";
  version = "3.12.0";
  pyproject = false; # Built with cmake

  src = fetchFromGitHub {
    owner = "stack-of-tasks";
    repo = "eigenpy";
    tag = "v${version}";
    hash = "sha256-U4uL0knGJFpD14Gc32lgTZlw7QlXHMEqTnp0bmHJRU8=";
  };

  outputs = [
    "dev"
    "doc"
    "out"
  ];

  cmakeFlags = [
    "-DINSTALL_DOCUMENTATION=ON"
    "-DBUILD_TESTING=ON"
    "-DBUILD_TESTING_SCIPY=ON"
  ];

  strictDeps = true;

  # Fontconfig error: Cannot load default config file: No such file: (null)
  env.FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";

  nativeBuildInputs = [
    cmake
    doxygen
    graphviz
    pkg-config
    scipy
    writableTmpDirAsHomeHook
  ];

  buildInputs = [ boost ];

  propagatedBuildInputs = [
    eigen
    jrl-cmakemodules
    numpy
  ];

  preInstallCheck = ''
    make test
  '';

  pythonImportsCheck = [ "eigenpy" ];

  meta = {
    description = "Bindings between Numpy and Eigen using Boost.Python";
    homepage = "https://github.com/stack-of-tasks/eigenpy";
    changelog = "https://github.com/stack-of-tasks/eigenpy/releases/tag/${src.tag}";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [
      nim65s
      wegank
    ];
    platforms = lib.platforms.unix;
  };
}