let
appNames = [
"apporder" "audioplayer" "bookmarks" "calendar" "carnet" "circles"
- "contacts" "cookbook" "deck" "extract" "files_markdown"
+ "contacts" "cookbook" "deck" "extract" "files_markdown" "files_mindmap"
"files_readmemd" "flowupload" "gpxedit" "gpxpod" "impersonate"
"keeweb" "maps" "metadata" "music" "notes" "ocsms" "passman" "polls"
"spreed" "social" "tasks"
];
allApps = lib.attrsets.genAttrs appNames
(name: callPackage (./apps + "/${name}.nix") { inherit buildApp nextcloudVersion; });
- buildApp = { appName, version, url, sha256, zip ? false, otherConfig ? {}, installPhase ? "mkdir -p $out && cp -R . $out/" }:
+ buildApp = { appName, version, url, sha256, zip ? false, installHook ? (n: ""), otherConfig ? {}, installPhase ? "mkdir -p $out && cp -R . $out/" }:
stdenv.mkDerivation rec {
name = "nextcloud-app-${appName}-${version}";
inherit version;
inherit installPhase;
src = (if zip then fetchzip else fetchurl) { inherit url sha256; };
passthru = {
- inherit appName otherConfig;
+ inherit appName otherConfig installHook;
};
};
toPassthru = pkg: apps: otherConfig: {
apps = toApps allApps;
toInstallApp = n: ''
ln -sf ${n} $out/apps/${n.appName}
- '';
+ '' + (n.installHook n);
zipped = lib.attrsets.zipAttrs ([pkg.otherConfig or {}] ++ map (v: v.otherConfig) apps);
appConfigs = with lib.attrsets; with lib.lists; {
mimetypealiases = foldr (h: prev: prev // h) {} (zipped.mimetypealiases or []);