5e7c2d6cef
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
41 lines
1.3 KiB
Nix
41 lines
1.3 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-mhjho6rby5TBuv1sSpj/kx9LQ6RW70hXUTBGbhnwXdY=";
|
|
|
|
composer = callPackage ../../../build-support/php/pkgs/composer-phar.nix {
|
|
inherit (finalAttrs) version;
|
|
inherit (finalAttrs.passthru) pharHash;
|
|
};
|
|
|
|
pname = "composer";
|
|
version = "2.6.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "composer";
|
|
repo = "composer";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-CKP7CYOuMKpuWdVveET2iLJPKJyCnv5YVjx4DE68UoE=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/composer \
|
|
--prefix PATH : ${lib.makeBinPath [ _7zz cacert curl git unzip xz ]}
|
|
'';
|
|
|
|
vendorHash = "sha256-SG5RsKaP7zqJY2vjvULuNdf7w6tAGh7/dlxx2Pkfj2A=";
|
|
|
|
meta = {
|
|
changelog = "https://github.com/composer/composer/releases/tag/${finalAttrs.version}";
|
|
description = "Dependency Manager for PHP";
|
|
homepage = "https://getcomposer.org/";
|
|
license = lib.licenses.mit;
|
|
maintainers = lib.teams.php.members;
|
|
};
|
|
})
|