-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
alist: add update.nix #358335
base: master
Are you sure you want to change the base?
alist: add update.nix #358335
Conversation
e41173f
to
26bce64
Compare
26bce64
to
2f333b1
Compare
2f333b1
to
18edbe7
Compare
18edbe7
to
42babc2
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.
With these comments addressed, I think this PR is good to go.
pkgs/by-name/al/alist/update.nix
Outdated
coreutils, | ||
gnused, |
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.
coreutils, | |
gnused, |
Not used.
pkgs/by-name/al/alist/update.nix
Outdated
# The solution is to run update-source-version for web after nix-update to ensure that webVersion is correct. | ||
nix-update alist --version "$version" | ||
|
||
# The --ignore-same-hash flag bypasses errors caused by the unchanged hash when the URL relies on a non-default version-key. |
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 think the reason is correct.
Before nix-update
, webVersion
is 3.39.2
. After nix-update
, webVersion
is changed to 3.40.0
, which is wrong. (Maybe open an issue to nix-update
?) Then, update-source-version
changes webVersion
to its latest version 3.39.2
which is the same as the original one, so its hash remains the same.
pkgs/by-name/al/alist/update.nix
Outdated
nix-update alist --version "$version" | ||
|
||
# The --ignore-same-hash flag bypasses errors caused by the unchanged hash when the URL relies on a non-default version-key. | ||
update-source-version alist "$webVersion" --source-key=web --version-key=webVersion --ignore-same-hash |
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.
--ignore-same-hash
is also needed.
Consider this situation: the latest webVersion
is the same as version
. nix-update
updates both versions to 3.40.0
. Then update-source-version
finds the "old" webVersion
(3.40.0
) equals to the latest one. Without --ignore-same-hash
, it will not update hash for web
, which results in a wrong hash.
|
Since there is no progress on the issue, a hacky way to update vendorHash is temporarily used here. |
Add
update.sh
to bump version automatically.https://github.com/AlistGo/alist/releases/tag/v3.40.0
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.