at 24.11-pre 36 lines 883 B view raw
1{ stdenv, fetchzip, applyPatches, lib, ... }: 2{ url 3, hash ? "" 4, sha256 ? "" 5, appName ? null 6, appVersion ? null 7, license 8, patches ? [ ] 9, description ? null 10, homepage ? null 11}: 12applyPatches ({ 13 inherit patches; 14 src = fetchzip { 15 inherit url hash sha256; 16 postFetch = '' 17 pushd $out &>/dev/null 18 if [ ! -f ./appinfo/info.xml ]; then 19 echo "appinfo/info.xml doesn't exist in $out, aborting!" 20 exit 1 21 fi 22 popd &>/dev/null 23 ''; 24 meta = { 25 license = lib.licenses.${license}; 26 longDescription = description; 27 inherit homepage; 28 } // lib.optionalAttrs (description != null) { 29 longDescription = description; 30 } // lib.optionalAttrs (homepage != null) { 31 inherit homepage; 32 }; 33 }; 34} // lib.optionalAttrs (appName != null && appVersion != null) { 35 name = "nextcloud-app-${appName}-${appVersion}"; 36})