about summary refs log tree commit diff
path: root/pkgs/build-support/php/pkgs/composer-phar.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/php/pkgs/composer-phar.nix')
-rw-r--r--pkgs/build-support/php/pkgs/composer-phar.nix38
1 files changed, 23 insertions, 15 deletions
diff --git a/pkgs/build-support/php/pkgs/composer-phar.nix b/pkgs/build-support/php/pkgs/composer-phar.nix
index f281334ab2d9f..b07c25beec55f 100644
--- a/pkgs/build-support/php/pkgs/composer-phar.nix
+++ b/pkgs/build-support/php/pkgs/composer-phar.nix
@@ -1,17 +1,16 @@
 {
-  _7zz
-  , cacert
-  , curl
-  , fetchurl
-  , git
-  , lib
-  , makeBinaryWrapper
-  , php
-  , stdenvNoCC
-  , unzip
-  , xz
-  , version
-  , pharHash
+  _7zz,
+  curl,
+  fetchurl,
+  git,
+  lib,
+  makeBinaryWrapper,
+  php,
+  stdenvNoCC,
+  unzip,
+  xz,
+  version,
+  pharHash,
 }:
 
 stdenvNoCC.mkDerivation (finalAttrs: {
@@ -32,9 +31,17 @@ stdenvNoCC.mkDerivation (finalAttrs: {
 
     mkdir -p $out/bin
     install -D $src $out/libexec/composer/composer.phar
-    makeWrapper ${php}/bin/php $out/bin/composer \
+    makeWrapper ${lib.getExe php} $out/bin/composer \
       --add-flags "$out/libexec/composer/composer.phar" \
-      --prefix PATH : ${lib.makeBinPath [ _7zz cacert curl git unzip xz ]}
+      --prefix PATH : ${
+        lib.makeBinPath [
+          _7zz
+          curl
+          git
+          unzip
+          xz
+        ]
+      }
 
     runHook postInstall
   '';
@@ -44,6 +51,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
     description = "Dependency Manager for PHP, shipped from the PHAR file";
     homepage = "https://getcomposer.org/";
     license = lib.licenses.mit;
+    mainProgram = "composer";
     maintainers = with lib.maintainers; [ drupol ];
     platforms = lib.platforms.all;
   };