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