-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
fetchNextcloudApp: rewrite with fetchzip & applyPatches #193075
Conversation
There are the following issues with the current implementation: * `fetchurl` with a tarball from GitHub appears to break occasionally because the tarballs are not necessarily reproducible. Because of that, `fetchFromGitHub` unpacks the tarball already because the contents are actually reproducible in contrast to the tarball. To have the same behavior here, we use `fetchzip` now (and `applyPatches` on top to apply additional patches if needed). * Fixes the way how patches are applied. Previously, when having patches for a git checkout of the app, these wouldn't apply because the `appname-version` prefix is missing. * Because all old hashes are broken with this, I added an evaluation check that breaks evaluation when using the old API (i.e. with `name`/`version` which are not needed anymore).
I think this will break nc4nix. Which isn't really a reason not to merge this, just a note that there is external tooling out there which this PR might break. |
I'm pretty sure that it will. Added an entry to the release-notes. Anything else tbd to get this merged? %) |
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 is indeed a much cleaner implementation than mine 👍
{ name | ||
, url | ||
, version | ||
{ stdenv, fetchzip, applyPatches, ... }: |
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.
stdenv
does not seem to be used anymore
Description of changes
There are the following issues with the current implementation:
fetchurl
with a tarball from GitHub appears to break occasionally because the tarballs are not necessarily reproducible. Because of that,fetchFromGitHub
unpacks the tarball already because the contents are actually reproducible in contrast to the tarball. To have the same behavior here, we usefetchzip
now (andapplyPatches
on top to apply additional patches if needed).Fixes the way how patches are applied. Previously, when having patches for a git checkout of the app, these wouldn't apply because the
appname-version
prefix is missing.Because all old hashes are broken with this, I added an evaluation check that breaks evaluation when using the old API (i.e. with
name
/version
which are not needed anymore).Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes