]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Fix passthru’s in pkgs
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 7 May 2019 13:07:35 +0000 (15:07 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 7 May 2019 13:07:35 +0000 (15:07 +0200)
pkgs/webapps/dokuwiki/default.nix
pkgs/webapps/mantisbt_2/default.nix
pkgs/webapps/mediagoblin/default.nix
pkgs/webapps/nextcloud/default.nix
pkgs/webapps/yourls/default.nix

index 7b5d899427a0e89dde8a04125de4505e753aaccc..9df88c6b24ca29fa3614b37385d87c114bae1a24 100644 (file)
@@ -16,8 +16,10 @@ let
     installPreloadPhase = ''
       cp ${preloadFile plugins} $out/inc/preload.php
       '';
-    passthru.plugins = plugins;
-    passthru.withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
+    passthru = old.passthru // {
+      inherit plugins;
+      withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
+    };
   });
   package = stdenv.mkDerivation (mylibs.fetchedGithub ./dokuwiki.json // rec {
     phases = "unpackPhase buildPhase installPhase installPreloadPhase fixupPhase";
index 3283a010500db8a8a9049c03611d0a2b69f3822d..bb2aad354c19dde76517301bef72e473c4417d3a 100644 (file)
@@ -10,8 +10,10 @@ let
             "ln -sf ${value} $out/plugins/${value.pluginName}"
         ) plugins
       ));
-    passthru.plugins = plugins;
-    passthru.withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
+    passthru = old.passthru // {
+      inherit plugins;
+      withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
+    };
   });
   package = stdenv.mkDerivation rec {
     name = "mantisbt-${version}";
index e1ca898640d72de885a92971a1cc0aa7a606355f..643daedfa18cd8ff80737bfdbf5894d44c9c351e 100644 (file)
@@ -108,8 +108,10 @@ let
         map (value: "ln -s ${value} mediagoblin/plugins/${value.pluginName}") plugins
         )
       );
-    passthru.plugins = plugins;
-    passthru.withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
+    passthru = old.passthru // {
+      inherit plugins;
+      withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
+    };
   });
   package = stdenv.mkDerivation (mylibs.fetchedGit ./mediagoblin.json // rec {
     preConfigure = ''
index 0287f75321bcafe99d3394b7b3af41ff9fec1917..2d4eb3909dcd5bb47300370b8b6b8fe06a22b584 100644 (file)
@@ -19,15 +19,17 @@ let
         map (value: "ln -sf ${value} $out/apps/${value.appName}") apps
       ));
 
-    passthru.otherConfig = with lib.attrsets; with lib.lists; let
-      zipped = zipAttrs ([old.otherConfig or {}] ++ map (v: v.otherConfig) apps);
-    in
-      {
-        mimetypealiases = foldr (h: prev: prev // h) {} zipped.mimetypealiases;
-        mimetypemapping = mapAttrs (_: v: unique (flatten v)) (zipAttrs zipped.mimetypemapping);
-      };
-    passthru.apps = apps;
-    passthru.withApps = moreApps: old.withApps (moreApps ++ apps);
+    passthru = old.passthru // {
+      otherConfig = with lib.attrsets; with lib.lists; let
+        zipped = zipAttrs ([old.otherConfig or {}] ++ map (v: v.otherConfig) apps);
+      in
+        {
+          mimetypealiases = foldr (h: prev: prev // h) {} zipped.mimetypealiases;
+          mimetypemapping = mapAttrs (_: v: unique (flatten v)) (zipAttrs zipped.mimetypemapping);
+        };
+      inherit apps;
+      withApps = moreApps: old.withApps (moreApps ++ apps);
+    };
   });
 
   package = stdenv.mkDerivation rec {
index cc880cd96df0dd64c075f69b425496b4b77a77ed..4bcfa4cc8d5b91bec6b4ed9d6de4b30060143da6 100644 (file)
@@ -6,8 +6,10 @@ let
       builtins.concatStringsSep "\n" (
         map (value: "ln -s ${value} $out/user/plugins/${value.pluginName}") plugins
       );
-    passthru.plugins = plugins;
-    passthru.withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
+    passthru = old.passthru // {
+      inherit plugins;
+      withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
+    };
   });
   package = stdenv.mkDerivation (mylibs.fetchedGithub ./yourls.json // rec {
     installPhase = ''