From 46515fbadaf0c9bd92baad91cee33e354edb7be8 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 17 Oct 2019 02:44:43 -0700 Subject: [PATCH] pythonPackages.pybind11: expose headers --- pkgs/development/python-modules/pybind11/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix index 94a25b2858e..2df360dfaab 100644 --- a/pkgs/development/python-modules/pybind11/default.nix +++ b/pkgs/development/python-modules/pybind11/default.nix @@ -23,7 +23,8 @@ buildPythonPackage rec { dontUseCmakeConfigure = true; - checkInputs = [ pytest cmake ] + nativeBuildInputs = [ cmake ]; + checkInputs = [ pytest ] ++ (lib.optional (numpy != null) numpy) ++ (lib.optional (eigen != null) eigen) ++ (lib.optional (scipy != null) scipy); @@ -32,6 +33,11 @@ buildPythonPackage rec { make -j $NIX_BUILD_CORES pytest ''; + # re-expose the headers to other packages + postInstall = '' + ln -s $out/include/python${python.pythonVersion}m/pybind11/ $out/include/pybind11 + ''; + meta = { homepage = https://github.com/pybind/pybind11; description = "Seamless operability between C++11 and Python";