phpPackages.composer: Move to separate directory

This commit is contained in:
Elis Hirwing 2020-10-11 16:37:09 +02:00
parent 5c8e29da49
commit a149fe969c
No known key found for this signature in database
GPG Key ID: D57EFA625C9A925F
2 changed files with 33 additions and 28 deletions

View File

@ -0,0 +1,32 @@
{ mkDerivation, fetchurl, pkgs, lib, php }:
let
pname = "composer";
version = "1.10.13";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://getcomposer.org/download/${version}/composer.phar";
sha256 = "13vhfdlkmpvmk1h30f1i688xk7sdgfj0b82am32jgpa8zmf499sw";
};
dontUnpack = true;
nativeBuildInputs = [ pkgs.makeWrapper ];
installPhase = ''
mkdir -p $out/bin
install -D $src $out/libexec/composer/composer.phar
makeWrapper ${php}/bin/php $out/bin/composer \
--add-flags "$out/libexec/composer/composer.phar" \
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.unzip ]}
'';
meta = with pkgs.lib; {
description = "Dependency Manager for PHP";
license = licenses.mit;
homepage = "https://getcomposer.org/";
maintainers = with maintainers; [ offline ] ++ teams.php.members;
};
}

View File

@ -35,34 +35,7 @@ in
packages = {
box = callPackage ../development/php-packages/box { };
composer = mkDerivation rec {
version = "1.10.13";
pname = "composer";
src = pkgs.fetchurl {
url = "https://getcomposer.org/download/${version}/composer.phar";
sha256 = "13vhfdlkmpvmk1h30f1i688xk7sdgfj0b82am32jgpa8zmf499sw";
};
dontUnpack = true;
nativeBuildInputs = [ pkgs.makeWrapper ];
installPhase = ''
mkdir -p $out/bin
install -D $src $out/libexec/composer/composer.phar
makeWrapper ${php}/bin/php $out/bin/composer \
--add-flags "$out/libexec/composer/composer.phar" \
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.unzip ]}
'';
meta = with pkgs.lib; {
description = "Dependency Manager for PHP";
license = licenses.mit;
homepage = "https://getcomposer.org/";
maintainers = with maintainers; [ offline ] ++ teams.php.members;
};
};
composer = callPackage ../development/php-packages/composer { };
composer2 = mkDerivation rec {
version = "2.0.0-RC1";