2023-06-18 12:13:35 +00:00
|
|
|
{ stdenv, fetchzip, applyPatches, lib, ... }:
|
2022-09-26 18:32:33 +00:00
|
|
|
{ url
|
2021-09-25 20:19:14 +00:00
|
|
|
, sha256
|
2023-08-20 10:30:34 +00:00
|
|
|
, appName ? null
|
|
|
|
, appVersion ? null
|
|
|
|
, license
|
2021-09-25 20:19:14 +00:00
|
|
|
, patches ? [ ]
|
2022-09-26 18:32:33 +00:00
|
|
|
, name ? null
|
|
|
|
, version ? null
|
2023-06-18 12:13:35 +00:00
|
|
|
, description ? null
|
|
|
|
, homepage ? null
|
2021-09-25 20:19:14 +00:00
|
|
|
}:
|
2022-09-26 18:32:33 +00:00
|
|
|
if name != null || version != null then throw ''
|
|
|
|
`pkgs.fetchNextcloudApp` has been changed to use `fetchzip`.
|
|
|
|
To update, please
|
|
|
|
* remove `name`/`version`
|
|
|
|
* update the hash
|
|
|
|
''
|
2023-08-20 10:30:34 +00:00
|
|
|
else applyPatches ({
|
2022-09-26 18:32:33 +00:00
|
|
|
inherit patches;
|
|
|
|
src = fetchzip {
|
2021-10-09 20:36:35 +00:00
|
|
|
inherit url sha256;
|
2022-09-26 18:32:33 +00:00
|
|
|
postFetch = ''
|
|
|
|
pushd $out &>/dev/null
|
|
|
|
if [ ! -f ./appinfo/info.xml ]; then
|
|
|
|
echo "appinfo/info.xml doesn't exist in $out, aborting!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
popd &>/dev/null
|
|
|
|
'';
|
2023-08-20 10:30:34 +00:00
|
|
|
meta = {
|
|
|
|
license = lib.licenses.${license};
|
2023-06-18 12:13:35 +00:00
|
|
|
longDescription = description;
|
|
|
|
inherit homepage;
|
2023-08-20 10:30:34 +00:00
|
|
|
};
|
2021-09-25 20:19:14 +00:00
|
|
|
};
|
2023-08-20 10:30:34 +00:00
|
|
|
} // lib.optionalAttrs (appName != null && appVersion != null) {
|
|
|
|
name = "nextcloud-app-${appName}-${appVersion}";
|
|
|
|
})
|