fetchNextcloudApp: remove backwards compat for old interface
The `name` & `version` attributes only existed in a previous form of the API before it was switched over to using `fetchzip` & `applyPatches`[1]. The attributes existed to be able to throw an evaluation error with upgrade instructions when this was used. However, this was before 22.11, so this shouldn't be in use anymore (and if somebody is doing a migration from a very old NixOS, this is still documented in the 22.11 release-notes[2]). Anyways, this simplifies the code a little bit and also having both `appName`/`appVersion` and `name`/`version` in there is quite confusing. But still, I figured it's less confusing to not re-use attributes that were deprecated in the past, hence the alternative naming. [1]3ca9b9a8ad
[2]d41b381310
This commit is contained in:
parent
c317dcec0d
commit
9a62a46874
@ -5,18 +5,10 @@
|
||||
, appVersion ? null
|
||||
, license
|
||||
, patches ? [ ]
|
||||
, name ? null
|
||||
, version ? null
|
||||
, description ? null
|
||||
, homepage ? null
|
||||
}:
|
||||
if name != null || version != null then throw ''
|
||||
`pkgs.fetchNextcloudApp` has been changed to use `fetchzip`.
|
||||
To update, please
|
||||
* remove `name`/`version`
|
||||
* update the hash
|
||||
''
|
||||
else applyPatches ({
|
||||
applyPatches ({
|
||||
inherit patches;
|
||||
src = fetchzip {
|
||||
inherit url sha256;
|
||||
@ -32,6 +24,10 @@ else applyPatches ({
|
||||
license = lib.licenses.${license};
|
||||
longDescription = description;
|
||||
inherit homepage;
|
||||
} // lib.optionalAttrs (description != null) {
|
||||
longDescription = description;
|
||||
} // lib.optionalAttrs (homepage != null) {
|
||||
inherit homepage;
|
||||
};
|
||||
};
|
||||
} // lib.optionalAttrs (appName != null && appVersion != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user