about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2023-08-20 13:29:58 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2023-08-20 13:41:43 +0200
commit9a62a468740f355b6cfa5113583eece980a17869 (patch)
tree4d00eeaa2e48318a2caf420568c570ec0fcd86df /pkgs/build-support
parentc317dcec0d36ba6c51f73bd23b5425a3f1d03141 (diff)
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] 3ca9b9a8ad1b9dee2ec40eecca557f0578786b93
[2] d41b381310f5dcde1434b23406532f54ebdeea22
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/fetchnextcloudapp/default.nix14
1 files changed, 5 insertions, 9 deletions
diff --git a/pkgs/build-support/fetchnextcloudapp/default.nix b/pkgs/build-support/fetchnextcloudapp/default.nix
index 658cd87cafa78..0ec64bbe1df6d 100644
--- a/pkgs/build-support/fetchnextcloudapp/default.nix
+++ b/pkgs/build-support/fetchnextcloudapp/default.nix
@@ -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) {