Skip to content
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

Nix build #6854

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Nix build #6854

wants to merge 2 commits into from

Conversation

netogallo
Copy link

I am building a derivation for NixOS 24.05 of open3d-cpu so it can be easily used in nix. To guarantee reproducibility, Nix cannot fetch resources during build and best practices recommend using packages already present in the nix store. For that reason, I removed the use of deprecated functions from ImGui.

Additionally, Nix allows users to easily modify the build parameters of packages, to that end I included a flag to disable the "ComputeUVAtlas" function as it is a single function that leads to the inclusion of significant dependencies.

Finally, Nix does not install packages in systemwide directories. Instead, each package and version gets installed in an isolated directory and nix uses symlinks and env variables to bring the packages into scope. Therefore, a hardcoded DESKTOP_INSTALL_DIR is not suitable for this environment and must be supplied through a compile time variable. If this variable is not supplied (default), the behavior remains unchanged.

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

These changes are required to eventually update ImGui to version 1.9.6. Furthermore, it adds a CMake flag that allows users to build a smaller package by removing the TriangleMesh::ComptueUVAtlas function which adds many additional dependencies to the project. The function is included by default in order to preserve existing behavior.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

Allow compiling open3d-cpu python package on NixOs 24.05

  • Remove the use of deprecated functions in ImGui
  • CMake option to exclude uvatlas as dependency as a single function leads to the inclusion of many libraries.
  • CMake option to override the desktop install path.

The derivation for packaging v0.18.0 is available at: https://github.com/netogallo/nix-packages/blob/main/pkgs/python-packages/open3d/open3d-common.nix

It currently applies a similar patch before building.

Ernesto Rodriguez added 2 commits July 4, 2024 08:18
* Remove the use of deprecated functions in ImGui
* CMake option to exclude uvatlas as dependency as a single function
  leads to the inclusion of many libraries.
* CMake option to override the desktop install path
Copy link

update-docs bot commented Jul 4, 2024

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

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

Successfully merging this pull request may close these issues.

None yet

1 participant