-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
treewide: fix hard-coded sourceRoot
prefix for fetchgit
-based src
#294334
Conversation
Result of |
According to Nixpkgs manual[1] and NixOS 23.11 Release Note[2], the `sourceRoot` attribute passed to `stdenv.mkDerivation` should be specified as `"${src.name}"` or `"${src.name}/subdir"` when `src` is produced using `fetchgit`-based fetchers. `sourceRoot = "source"` or `sourceRoot = "source/subdir"` is based on the assumption that the `name` attribute of these pre-unpacked fetchers are always `"source"`, which is not the case. Expecting constant `name` also makes the source FODs prone to irrelevent hashes during version bumps. [1]: https://nixos.org/manual/nixpkgs/unstable/#var-stdenv-sourceRoot [2]: https://nixos.org/manual/nixos/stable/release-notes#sec-release-23.11
1db0b94
to
91b3db1
Compare
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.
Hi!
Just to stay on the safe side, could you please call @ofborg build
with all the derivations that were updated?
Thx
Is there a way to programmatically get the list of packages? The If not, I'll just log the output of nixpkgs-review and select them out manually. |
I don't know any way of automatizing this, I guess manually doing it is the only way, there not that much. |
@drupol I have confused this PR with #294068 in my previous reply. @ofborg build vimPlugins awesomebump geph localsend autodock-vina openrefine anilibria-winmaclinux c2fmzq frankenphp intiface-central lanzaboote-tool liana linien-gui mercure monophony rustdesk-flutter snippetexpanderx svix-server syn2mas torrentstream flutter coqPackages_8_16.vcfloat coqPackages_8_17.vcfloat mpfi opentelemetry-collector opentelemetry-collector-contrib opentelemetry-cpp python3Packages.bootstrap.flit-core python3Packages.daqp python3Packages.flit-core python3Packages.kanidm python3Packages.linien-client python3Packages.linien-common python3Packages.openllm-client python3Packages.openllm-core python3Packages.openllm python3Packages.pendulum_3 python3Packages.prophet sudachidict-core sudachidict-full sudachidict-small electron-source electron-bin gendef opensnitch tailor-gui openobserve SP800-90B_EntropyAssessment mpremote |
Update: Not as many for this PR. |
It seems that OfBorg actually rebuilds the specified packages, which is great for testing purpose. |
Description of changes
According to Nixpkgs manual and NixOS 23.11 Release Note, the
sourceRoot
attribute passed tostdenv.mkDerivation
should be specified as"${src.name}"
or"${src.name}/subdir"
whensrc
is produced usingfetchgit
-based fetchers.sourceRoot = "source"
orsourceRoot = "source/subdir"
is based on the assumption that thename
attribute of these pre-unpacked fetchers are always"source"
, which is not the case. Expecting constantname
also makes the source FODs prone to irrelevent hashes during version bumps.This PR should cause no rebuild. As the issue occurs also on the stable branch, we could also backport this fix to the stable branch.
This is a continuation of #245388 and an initial effort for #294068.
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.