Merge pull request #258281 from NixOS/php/composer/use-fetchgit
phpPackages.composer: use `fetchgit`
This commit is contained in:
commit
d7186d62bb
1 changed files with 9 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
{ lib, callPackage, fetchFromGitHub, php, unzip, _7zz, xz, git, curl, cacert, makeBinaryWrapper }:
|
||||
{ lib, callPackage, fetchgit, php, unzip, _7zz, xz, git, curl, cacert, makeBinaryWrapper }:
|
||||
|
||||
php.buildComposerProject (finalAttrs: {
|
||||
composer = callPackage ../../../build-support/php/pkgs/composer-phar.nix { };
|
||||
|
@ -6,11 +6,14 @@ php.buildComposerProject (finalAttrs: {
|
|||
pname = "composer";
|
||||
version = "2.6.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "composer";
|
||||
repo = "composer";
|
||||
|
||||
# We use `fetchgit` instead of `fetchFromGitHub` to ensure the existence
|
||||
# of the `composer.lock` file, which is omitted in the archive downloaded
|
||||
# via `fetchFromGitHub`.
|
||||
src = fetchgit {
|
||||
url = "https://github.com/composer/composer.git";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-o7z2GBiYjTwDQR9ZFuOOV8zsKUuGqyA52dvwTzo4hVA=";
|
||||
hash = "sha256-8lylMfTARff+gBZpIRqttmE0jeXdJnLHZKVmqHY3p+s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
|
@ -20,7 +23,7 @@ php.buildComposerProject (finalAttrs: {
|
|||
--prefix PATH : ${lib.makeBinPath [ _7zz cacert curl git unzip xz ]}
|
||||
'';
|
||||
|
||||
vendorHash = "sha256-S6LprixkLIbD+qqvg+eYjWsDe+jFl9NO1qWztWYKPXs=";
|
||||
vendorHash = "sha256-SG5RsKaP7zqJY2vjvULuNdf7w6tAGh7/dlxx2Pkfj2A=";
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/composer/composer/releases/tag/${finalAttrs.version}";
|
||||
|
|
Loading…
Reference in a new issue