diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/fetchnextcloudapp/default.nix')
-rw-r--r-- | nixpkgs/pkgs/build-support/fetchnextcloudapp/default.nix | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/build-support/fetchnextcloudapp/default.nix b/nixpkgs/pkgs/build-support/fetchnextcloudapp/default.nix index a7a3066ffab3..0ec64bbe1df6 100644 --- a/nixpkgs/pkgs/build-support/fetchnextcloudapp/default.nix +++ b/nixpkgs/pkgs/build-support/fetchnextcloudapp/default.nix @@ -1,17 +1,14 @@ -{ stdenv, fetchzip, applyPatches, ... }: +{ stdenv, fetchzip, applyPatches, lib, ... }: { url , sha256 +, appName ? null +, 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; @@ -23,5 +20,16 @@ else applyPatches { fi popd &>/dev/null ''; + meta = { + 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) { + name = "nextcloud-app-${appName}-${appVersion}"; +}) |