summary refs log tree commit diff
path: root/pkgs/development/libraries/pybind11/default.nix
blob: d7bca0de249897bed1a8a33d2b4589c1b8541c30 (plain) (blame)
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
{ stdenv, fetchFromGitHub, cmake, python }:

stdenv.mkDerivation rec {
  name = "pybind-${version}";
  version = "2.2.2";
  src = fetchFromGitHub {
    owner = "pybind";
    repo = "pybind11";
    rev = "v${version}";
    sha256 = "0x71i1n5d02hjbdcnkscrwxs9pb8kplmdpqddhsimabfp84fip48";
  };

  nativeBuildInputs = [ cmake ];

  # disable tests as some tests (test_embed/test_interpreter) are failing at the moment
  cmakeFlags = [
     "-DPYTHON_EXECUTABLE=${python.interpreter}"
     "-DPYBIND11_TEST=0"
  ];
  doCheck = false;

  meta = {
    homepage = https://github.com/pybind/pybind11;
    description = "Seamless operability between C++11 and Python";
    longDescription = ''
      Pybind11 is a lightweight header-only library that exposes
      C++ types in Python and vice versa, mainly to create Python
      bindings of existing C++ code.
    '';
    platforms = with stdenv.lib.platforms; unix;
    license = stdenv.lib.licenses.bsd3;
    maintainers = with stdenv.lib.maintainers; [ yuriaisaka ];
  };

}