2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
callPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
php,
|
|
|
|
unzip,
|
|
|
|
_7zz,
|
|
|
|
xz,
|
|
|
|
git,
|
|
|
|
curl,
|
|
|
|
cacert,
|
|
|
|
makeBinaryWrapper,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
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.
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.pharHash = "sha256-KdyaGe8zU12wYbMRgLKoM6fPjSz0FFszovg1BId7ugg=";
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
composer = callPackage ../../../build-support/php/pkgs/composer-phar.nix {
|
|
|
|
inherit (finalAttrs) version;
|
|
|
|
inherit (finalAttrs.passthru) pharHash;
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "composer";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.7.6";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "composer";
|
|
|
|
repo = "composer";
|
|
|
|
rev = finalAttrs.version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-LZwg3PR3zl07Nb6MS8oKkRfjLgqtT/c4sfUOzWE4S+U=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/composer \
|
2024-05-15 15:35:15 +00:00
|
|
|
--prefix PATH : ${
|
|
|
|
lib.makeBinPath [
|
|
|
|
_7zz
|
|
|
|
cacert
|
|
|
|
curl
|
|
|
|
git
|
|
|
|
unzip
|
|
|
|
xz
|
|
|
|
]
|
|
|
|
}
|
2020-10-16 20:44:37 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-dNNV9fTyGyRoGeDV/vBjn0aMgkaUMsrKQv5AOoiYokQ=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/composer/composer/releases/tag/${finalAttrs.version}";
|
2020-10-16 20:44:37 +00:00
|
|
|
description = "Dependency Manager for PHP";
|
|
|
|
homepage = "https://getcomposer.org/";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = lib.licenses.mit;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "composer";
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = lib.teams.php.members;
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
})
|