depot/third_party/nixpkgs/pkgs/development/php-packages/composer/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

63 lines
1.4 KiB
Nix

{
lib,
callPackage,
fetchFromGitHub,
php,
unzip,
_7zz,
xz,
git,
curl,
cacert,
makeBinaryWrapper,
}:
php.buildComposerProject (finalAttrs: {
# Hash used by ../../../build-support/php/pkgs/composer-phar.nix to
# use together with the version from this package to keep the
# bootstrap phar file up-to-date together with the end user composer
# package.
passthru.pharHash = "sha256-KdyaGe8zU12wYbMRgLKoM6fPjSz0FFszovg1BId7ugg=";
composer = callPackage ../../../build-support/php/pkgs/composer-phar.nix {
inherit (finalAttrs) version;
inherit (finalAttrs.passthru) pharHash;
};
pname = "composer";
version = "2.7.6";
src = fetchFromGitHub {
owner = "composer";
repo = "composer";
rev = finalAttrs.version;
hash = "sha256-LZwg3PR3zl07Nb6MS8oKkRfjLgqtT/c4sfUOzWE4S+U=";
};
nativeBuildInputs = [ makeBinaryWrapper ];
postInstall = ''
wrapProgram $out/bin/composer \
--prefix PATH : ${
lib.makeBinPath [
_7zz
cacert
curl
git
unzip
xz
]
}
'';
vendorHash = "sha256-dNNV9fTyGyRoGeDV/vBjn0aMgkaUMsrKQv5AOoiYokQ=";
meta = {
changelog = "https://github.com/composer/composer/releases/tag/${finalAttrs.version}";
description = "Dependency Manager for PHP";
homepage = "https://getcomposer.org/";
license = lib.licenses.mit;
mainProgram = "composer";
maintainers = lib.teams.php.members;
};
})