diff --git a/pkgs/development/libraries/pybind11/default.nix b/pkgs/development/libraries/pybind11/default.nix new file mode 100644 index 000000000000..d7bca0de2498 --- /dev/null +++ b/pkgs/development/libraries/pybind11/default.nix @@ -0,0 +1,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 ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c3960513387..a1f806f8af80 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11421,6 +11421,8 @@ with pkgs; pugixml = callPackage ../development/libraries/pugixml { }; + pybind11 = callPackage ../development/libraries/pybind11 { }; + re2 = callPackage ../development/libraries/re2 { }; qbs = callPackage ../development/tools/build-managers/qbs { };