mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 10:23:29 +00:00
phpPackages.phive: use buildComposerProject
builder
This commit is contained in:
parent
b7f3d0df8f
commit
dae4e32f4b
@ -1,32 +1,27 @@
|
||||
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, php
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
php.buildComposerProject (finalAttrs: {
|
||||
pname = "phive";
|
||||
version = "0.15.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/phar-io/phive/releases/download/${version}/phive-${version}.phar";
|
||||
sha256 = "K7B2dT7F1nL14vlql6D+fo6ewkpDnu0A/SnvlCx5Bfk=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "phar-io";
|
||||
repo = "phive";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-K/YZOGANcefjfdFY1XYEQknm0bPRorlRnNGC7dEegZ0=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
vendorHash = "sha256-0fJ+SyicvVONJ4FkOFTkBTekDAOjBfaLo0dZ2DYlGJU=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
install -D $src $out/libexec/phive/phive.phar
|
||||
makeWrapper ${php}/bin/php $out/bin/phive \
|
||||
--add-flags "$out/libexec/phive/phive.phar"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/phar-io/phive/releases/tag/${version}";
|
||||
meta = {
|
||||
changelog = "https://github.com/phar-io/phive/releases/tag/${finalAttrs.version}";
|
||||
description = "The Phar Installation and Verification Environment (PHIVE)";
|
||||
homepage = "https://github.com/phar-io/phive";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; teams.php.members;
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "phive";
|
||||
maintainers = lib.teams.php.members;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user