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
singularity: 2.6.0 -> 3.0.1 #50939
singularity: 2.6.0 -> 3.0.1 #50939
Conversation
Not sure why the python commits came up there... |
I've updated up this pull request for a cleaner commit history and also fixed a typo. Could we re-review? |
Actually I failed to get rid of the two extra commits in this pull request that aren't mine; not sure why they're there. Any suggestions? |
@jbedo Can do |
Hmm it just pushed the problem back to an earlier commit. |
You can see in output of |
Thanks! |
Is there a reason why are you not using |
Singularity has it's own configuration and build process different from most go packages. A custom config script generates makefiles which eventually call |
Your current derivation includes go compiler in the closure. It's not a huge deal, but nixpkgs/pkgs/development/go-modules/generic/default.nix Lines 46 to 48 in b4593b4
nixpkgs/pkgs/development/go-modules/generic/default.nix Lines 219 to 220 in b4593b4
|
Good point, I'll rewrite with the go builder. |
It really didn't fit the go package builder as the install tree layout is not a standard gopkg install tree. I have instead removed references to go in the fixup stage. |
@GrahamcOfBorg build singularity |
@jbedo it is still a good idea to stick with |
Ok, however all three phases will be have to be overridden and multiple outputs disabled. It would be interesting to see if cross-compiling works, but since it only runs on x86_64-linux I'm not sure how much value this would be. |
Updated to use buildGoPackage. |
''; | ||
|
||
postFixup = '' | ||
find $out/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true |
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.
This should be no longer necessary when using buildGoPackage
.
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.
find $out/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true |
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.
Unfortunately it is required as there are binaries outside of the bin/
directory that are not found by the default fixup.
I just the following
but got the following error:
|
Works! Thanks for your effort. |
This has a merge conflict with master now. |
@GrahamcOfBorg build singularity |
The updated version works. Minutes ago, I have just switched to unstable and try to use singularity, but it complains about UID error. Then I struggled for a while and find that maybe this is caused by I turned on program.singularity and simultaneously put singularity in pkgs. Then the /run/current-system/sw/bin/singularity points to the latter one. Finally I removed singularity in pkgs, and keep only program.singulariy enabled, then it works. |
This pull request has been mentioned on Nix community. There might be relevant details there: https://discourse.nixos.org/t/how-to-create-setuid-wrapper-for-installed-program/2590/6 |
Motivation for this change
Update singularity to 3.x branch. Resolves #49269.
Provide rootless use of singularity for nixos via module configuration. Resolves #49683.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)