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

Merge NixOS support from lopsided98 #306

Closed
wants to merge 24 commits into from

Conversation

robwoolley
Copy link
Contributor

NixOS is used by Clearpath Robotics and other developers. The creator of the NixOS support expressed interest in merging the changes upstream. The work has been tested with the following commands:

git clone https://github.com/lopsided98/nix-ros-overlay $HOME/nix-ros-overlay

superflore-gen-nix \
	--output-repository-path $HOME/nix-ros-overlay \
	--upstream-branch develop \
	--all \
	--dry-run

lopsided98 and others added 24 commits March 28, 2022 19:49
This makes Nix package generation nearly 4 times faster, if tarballs are already
cached. Some of the optimizations also apply to other distros, but the
performance impact there was not tested.
GitLab returns a 403 error if the default urllib user agent is used.
This allows conditions in package.xml to be evaluated correctly. Mostly
copied from the Bitbake generator.
This is required to make strictDeps/cross-compilation work.
This name better represents what this class does, which is to generate the
actual text of a Nix expression for a package.
The license translation logic has changed, and adds a hyphen to unknown
licenses. Also, add a test for the public domain license.
When --all is specified, generate for rolling as well.
The license string in the generated nix package file was broken when the
license name contained quote.

It has been fixed. Backslash and the sequence "dollar opening bracket"
have been escaped too.
Use the same function to escape the description string as is used for
the license string.
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/build-systems-package-management-and-nix/41488/11

@robwoolley
Copy link
Contributor Author

The CI tests fail with the following message:

b"/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/gen_packages.py:159:80: E501 line too long (88 > 79 characters)\n/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/gen_packages.py:177:80: E501 line too long (99 > 79 characters)\n/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/gen_packages.py:212:80: E501 line too long (88 > 79 characters)\n/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/overlay_instance.py:85:13: F841 local variable 'chunk_count' is assigned to but never used\n/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/overlay_instance.py:99:80: E501 line too long (80 > 79 characters)\n5\n"
b'/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/gen_packages.py:159:80: E501 line too long (88 > 79 characters)\n/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/gen_packages.py:177:80: E501 line too long (99 > 79 characters)\n/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/gen_packages.py:212:80: E501 line too long (88 > 79 characters)\n/home/runner/work/superflore/superflore/tests/../superflore/generators/ebuild/overlay_instance.py:99:80: E501 line too long (80 > 79 characters)\n4\n'

These are not files being changed in this commit. They are specific to the ebuild generator which is unrelated to the nix support.

This is solved by #308 .

@robwoolley
Copy link
Contributor Author

Closing in favour of #309. The second PR is rebased on the PEP8 fix in #308 so that the CI checks pass.

@robwoolley robwoolley closed this Jan 19, 2025
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.

4 participants