75ca762b89
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
32 lines
858 B
Nix
32 lines
858 B
Nix
{ mkDerivation, fetchurl, makeWrapper, unzip, lib, php }:
|
|
let
|
|
pname = "composer";
|
|
version = "2.0.11";
|
|
in
|
|
mkDerivation {
|
|
inherit pname version;
|
|
|
|
src = fetchurl {
|
|
url = "https://getcomposer.org/download/${version}/composer.phar";
|
|
sha256 = "sha256-6r8pFwcglqlGeRk3YlATGeYh4rNppKElaywn9OaYRHc=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [ 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 : ${lib.makeBinPath [ unzip ]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Dependency Manager for PHP";
|
|
license = licenses.mit;
|
|
homepage = "https://getcomposer.org/";
|
|
maintainers = with maintainers; [ offline ] ++ teams.php.members;
|
|
};
|
|
}
|