]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - pkgs/webapps/nextcloud/default.nix
Christophe Carpentier site de Fans de HK
[perso/Immae/Config/Nix.git] / pkgs / webapps / nextcloud / default.nix
index 5017fd23b392b8dfdfb5ddd3cde60b7292c80211..1b011697eeb8f8a8223f007268f8ec2bfdf97c03 100644 (file)
@@ -2,14 +2,14 @@
 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;
@@ -17,7 +17,7 @@ let
       inherit installPhase;
       src = (if zip then fetchzip else fetchurl) { inherit url sha256; };
       passthru = {
-        inherit appName otherConfig;
+        inherit appName otherConfig installHook;
       };
     };
   toPassthru = pkg: apps: otherConfig: {
@@ -29,7 +29,7 @@ let
       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 []);