]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - flakes/etherpad-lite/default.nix
Add chatons infos
[perso/Immae/Config/Nix.git] / flakes / etherpad-lite / default.nix
index 21bce2875254023f54aae98e7c87c19f2cc68da7..d1af7f7ed8c136ea259025e8440bcdc57e22d6e0 100644 (file)
@@ -15,8 +15,8 @@ let
   # nix files are built using node2nix -i node-packages.json
   allModules = lib.attrsets.genAttrs moduleNames
     (name: (callPackage (./modules + "/${name}/node-packages.nix") { inherit nodeEnv; }).${name});
-  toPassthru = pkg: {
-    inherit varDir allModules nodejs;
+  toPassthru = pkg: moduleNames: {
+    inherit varDir allModules nodejs moduleNames;
     withModules = withModules pkg;
   };
   withModules = pkg: toModules:
@@ -29,9 +29,10 @@ let
           ln -s ${varDir}/ep_initialized/${n.packageName} $out/node_modules/${n.packageName}/.ep_initialized
         fi
       '';
+      modulesNames = map (n: n.packageName) modules;
       newEtherpad = pkg.overrideAttrs(old: {
         installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallModule modules);
-        passthru = toPassthru newEtherpad;
+        passthru = toPassthru newEtherpad moduleNames;
       });
     in newEtherpad;
   # built using node2nix -l package-lock.json
@@ -54,6 +55,7 @@ let
   package = stdenv.mkDerivation rec {
     name = "etherpad-lite-${src.version}";
     src = node-environment;
+    version = src.version;
     installPhase = ''
       mkdir -p $out
       mkdir $out/node_modules
@@ -61,6 +63,6 @@ let
       chmod u+w $out/src/static/js/
       ln -s ../src $out/node_modules/ep_etherpad-lite
       '';
-    passthru = toPassthru package;
+    passthru = toPassthru package [];
   };
 in package