about summary refs log tree commit diff
path: root/pkgs/development/tools/pnpm/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/pnpm/generic.nix')
-rw-r--r--pkgs/development/tools/pnpm/generic.nix76
1 files changed, 44 insertions, 32 deletions
diff --git a/pkgs/development/tools/pnpm/generic.nix b/pkgs/development/tools/pnpm/generic.nix
index 7050df448970..0eb8467a4274 100644
--- a/pkgs/development/tools/pnpm/generic.nix
+++ b/pkgs/development/tools/pnpm/generic.nix
@@ -7,10 +7,11 @@
   nodejs,
   testers,
   withNode ? true,
-
   version,
   hash,
-}: stdenvNoCC.mkDerivation (finalAttrs: {
+}:
+
+stdenvNoCC.mkDerivation (finalAttrs: {
   pname = "pnpm";
   inherit version;
 
@@ -26,7 +27,10 @@
 
   buildInputs = lib.optionals withNode [ nodejs ];
 
-  nativeBuildInputs = [ installShellFiles nodejs ];
+  nativeBuildInputs = [
+    installShellFiles
+    nodejs
+  ];
 
   installPhase = ''
     runHook preInstall
@@ -40,41 +44,49 @@
   '';
 
   postInstall =
-    if lib.toInt (lib.versions.major version) < 9 then ''
-      export HOME="$PWD"
-      node $out/bin/pnpm install-completion bash
-      node $out/bin/pnpm install-completion fish
-      node $out/bin/pnpm install-completion zsh
-      sed -i '1 i#compdef pnpm' .config/tabtab/zsh/pnpm.zsh
-      installShellCompletion \
-        .config/tabtab/bash/pnpm.bash \
-        .config/tabtab/fish/pnpm.fish \
-        .config/tabtab/zsh/pnpm.zsh
-    '' else ''
-      node $out/bin/pnpm completion bash >pnpm.bash
-      node $out/bin/pnpm completion fish >pnpm.fish
-      node $out/bin/pnpm completion zsh >pnpm.zsh
-      sed -i '1 i#compdef pnpm' pnpm.zsh
-      installShellCompletion pnpm.{bash,fish,zsh}
-    '';
+    if lib.toInt (lib.versions.major version) < 9 then
+      ''
+        export HOME="$PWD"
+        node $out/bin/pnpm install-completion bash
+        node $out/bin/pnpm install-completion fish
+        node $out/bin/pnpm install-completion zsh
+        sed -i '1 i#compdef pnpm' .config/tabtab/zsh/pnpm.zsh
+        installShellCompletion \
+          .config/tabtab/bash/pnpm.bash \
+          .config/tabtab/fish/pnpm.fish \
+          .config/tabtab/zsh/pnpm.zsh
+      ''
+    else
+      ''
+        node $out/bin/pnpm completion bash >pnpm.bash
+        node $out/bin/pnpm completion fish >pnpm.fish
+        node $out/bin/pnpm completion zsh >pnpm.zsh
+        sed -i '1 i#compdef pnpm' pnpm.zsh
+        installShellCompletion pnpm.{bash,fish,zsh}
+      '';
 
-  passthru = let
-    fetchDepsAttrs = callPackages ./fetch-deps { pnpm = finalAttrs.finalPackage; };
-  in {
-    inherit (fetchDepsAttrs) fetchDeps configHook;
+  passthru =
+    let
+      fetchDepsAttrs = callPackages ./fetch-deps { pnpm = finalAttrs.finalPackage; };
+    in
+    {
+      inherit (fetchDepsAttrs) fetchDeps configHook;
 
-    tests.version = lib.optionalAttrs withNode (
-      testers.testVersion { package = finalAttrs.finalPackage; }
-    );
-  };
+      tests.version = lib.optionalAttrs withNode (
+        testers.testVersion { package = finalAttrs.finalPackage; }
+      );
+    };
 
-  meta = with lib; {
+  meta = {
     description = "Fast, disk space efficient package manager for JavaScript";
     homepage = "https://pnpm.io/";
     changelog = "https://github.com/pnpm/pnpm/releases/tag/v${finalAttrs.version}";
-    license = licenses.mit;
-    maintainers = with maintainers; [ Scrumplex ];
-    platforms = platforms.all;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [
+      Scrumplex
+      gepbird
+    ];
+    platforms = lib.platforms.all;
     mainProgram = "pnpm";
   };
 })