8000 gz-math: init at 8.1.1 by Guelakais · Pull Request #401753 · NixOS/nixpkgs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

gz-math: init at 8.1.1 #401753

wants to merge 1 commit into from

Conversation

Guelakais
Copy link
Contributor
@Guelakais Guelakais commented Apr 25, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@Guelakais Guelakais force-pushed the gz-math branch 2 times, most recently from 6361eb1 to 2b4c1e6 Compare April 30, 2025 14:46
gz-cmake
];

buildInputs = [
Copy link
Contributor

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?

Copy link
Contributor Author

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,
Copy link
Contributor

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
Copy link
Contributor

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 ]));

Copy link
Contributor

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=";
};

Copy link
Contributor

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)"
+ '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0