2022-09-26 19:32:33 +01:00
|
|
|
{ stdenv, fetchzip, applyPatches, ... }:
|
|
|
|
{ url
|
2021-09-25 21:19:14 +01:00
|
|
|
, sha256
|
|
|
|
, patches ? [ ]
|
2022-09-26 19:32:33 +01:00
|
|
|
, name ? null
|
|
|
|
, version ? null
|
2021-09-25 21:19:14 +01:00
|
|
|
}:
|
2022-09-26 19:32:33 +01: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
|
|
|
|
''
|
|
|
|
else applyPatches {
|
|
|
|
inherit patches;
|
|
|
|
src = fetchzip {
|
2021-10-09 21:36:35 +01:00
|
|
|
inherit url sha256;
|
2022-09-26 19:32:33 +01: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
|
|
|
|
'';
|
2021-09-25 21:19:14 +01:00
|
|
|
};
|
|
|
|
}
|