treewide: fix hard-coded sourceRoot prefix for fetchgit-based src#294334
treewide: fix hard-coded sourceRoot prefix for fetchgit-based src#294334drupol merged 1 commit intoNixOS:masterfrom
sourceRoot prefix for fetchgit-based src#294334Conversation
|
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
drupol
left a comment
There was a problem hiding this comment.
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
sourceRootattribute passed tostdenv.mkDerivationshould be specified as"${src.name}"or"${src.name}/subdir"whensrcis produced usingfetchgit-based fetchers.sourceRoot = "source"orsourceRoot = "source/subdir"is based on the assumption that thenameattribute of these pre-unpacked fetchers are always"source", which is not the case. Expecting constantnamealso 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 = relaxedsandbox = truenix-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.