-
8000
-
-
Notifications
You must be signed in to change notification settings - Fork 15.6k
gz-math: init at 8.1.1 #401753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
gz-math: init at 8.1.1 #401753
Conversation
6361eb1
to
2b4c1e6
Compare
gz-cmake | ||
]; | ||
|
||
buildInputs = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repository also supports generating Python bindings via pybind11
, do you intend to support this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
problem is, If I try calling pybind11
, the following happens:
error:
… while calling the 'abort' builtin
at /nix/store/y4kpggqfiwxajb9ghffbbmhzdcmhrp46-source/lib/customisation.nix:312:7:
311| else
312| abort "lib.customisation.callPackageWith: ${error}";
| ^
313|
error: evaluation aborted with the following error message: 'lib.customisation.callPackageWith: Function called without required argument "pybind11" at /nix/store/y4kpggqfiwxajb9ghffbbmhzdcmhrp46-source/pkgs/by-name/gz/gz-math/package.nix:13'
gtest, | ||
python3, | ||
ruby, | ||
swig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ withPython ? false
|
||
nativeBuildInputs = [ | ||
cmake | ||
gz-cmake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ ] ++ lib.optional withPython (python3.withPackages (p: [ p.pybind11 ]));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a corresponding Python package that uses pkgs.gz-math
with toPythonModule
to create the module for you
tag = "gz-math${lib.versions.major finalAttrs.version}_${finalAttrs.version}"; | ||
hash = "sha256-E7u3EtpqNLvcqI5ycezwwAlbVHM3JdqeyLFWYlEaOYo="; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ postPatch =
+ # Remove vendored pybind11 and gtest, use nixpkgs' versions instead.
+ ''
+ rm -r src/python_pybind11
+ substituteInPlace src/CMakeLists.txt --replace-fail \
+ "add_subdirectory(python_pybind11)" "# add_subdirectory(python_pybind11
8244
)"
+
+ rm -r test/gtest_vendor
+ substituteInPlace test/CMakeLists.txt --replace-fail \
+ "add_subdirectory(gtest_vendor)" "# add_subdirectory(gtest_vendor)"
+ '';
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.