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
gnome3: switch to updateScript #33086
Conversation
pkgs/desktops/gnome-3/update.nix
Outdated
python = python3.withPackages (p: [ p.requests ]); | ||
in writeScript "update-${packageName}" '' | ||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]} | ||
latest_tag=$(python "${./find-latest-version.py}" "${packageName}" "${versionPolicy}" "stable") |
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.
I would like to make the stability configurable but, for some reason, I cannot make update.nix
accept arbitrary arguments:
$ nix-instantiate -E 'args@{foo, ...}: builtins.trace args {}' --arg foo 5 --arg bar 6
trace: { foo = <CODE>; }
526e509
to
969430d
Compare
969430d
to
d6299b4
Compare
3bca5cd
to
8c25b74
Compare
Lot of my GNOME packages have several legacy aliases, which causes them to be updated multiple times. This patch uses lib.unique to remove the duplicates.
8c25b74
to
4a7fc5f
Compare
in writeScript "update-${packageName}" '' | ||
set -o errexit | ||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]} | ||
latest_tag=$(python "${./find-latest-version.py}" "${packageName}" "${versionPolicy}" "stable") |
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.
I do not see an easy way to make the stability configurable from maintainers/scripts/update.nix
. I guess I will just have to change it manually when working on unstable branch.
|
||
let | ||
python = python3.withPackages (p: [ p.requests ]); | ||
in writeScript "update-${packageName}" '' |
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.
I do not really like that this creates a derivation per package updated but maintainers/scripts/update.nix
is quite limited.
}; | ||
|
||
passthru = { | ||
updateScript = gnome3.updateScript { packageName = "evolution"; attrPath = "gnome3.evolution"; }; |
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.
I do not like the need to specify the attrPath
here very much but update-source-version
cannot do without it.
Motivation for this change
This will allow us to get rid of those pesky
src.nix
files.I also have a script for semi-automatic removal of the
src
files in the rest of the GNOME packages:inlinesrcs.py
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)cc @garbas, @lheckemann