mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
phpPackages.phpmd: use buildComposerProject
builder
This commit is contained in:
parent
6886619435
commit
ee4ecc331b
1235
pkgs/development/php-packages/phpmd/composer.lock
generated
Normal file
1235
pkgs/development/php-packages/phpmd/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,30 @@
|
||||
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, php
|
||||
}:
|
||||
|
||||
let
|
||||
php.buildComposerProject (finalAttrs: {
|
||||
pname = "phpmd";
|
||||
version = "2.15.0";
|
||||
in
|
||||
mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/phpmd/phpmd/releases/download/${version}/phpmd.phar";
|
||||
sha256 = "sha256-aijvVd4MdTsHDR0VgLsIoNFGAW+J8O3c72CsT8EINUQ=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "phpmd";
|
||||
repo = "phpmd";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-nTuJGzOZnkqrfE9R9Vujz/zGJRLlj8+yRZmmnxWrieQ=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
# Missing `composer.lock` from the repository.
|
||||
# Issue open at https://github.com/phpmd/phpmd/issues/1056
|
||||
composerLock = ./composer.lock;
|
||||
vendorHash = "sha256-vr0wQkfhXHLEz8Q5nEq5Bocu1U1nDhXUlaHBsysvuRQ=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
install -D $src $out/libexec/phpmd/phpmd.phar
|
||||
makeWrapper ${php}/bin/php $out/bin/phpmd \
|
||||
--add-flags "$out/libexec/phpmd/phpmd.phar"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/phpmd/phpmd/releases/tag/${version}";
|
||||
meta = {
|
||||
changelog = "https://github.com/phpmd/phpmd/releases/tag/${finalAttrs.version}";
|
||||
description = "PHP code quality analyzer";
|
||||
license = licenses.bsd3;
|
||||
homepage = "https://phpmd.org/";
|
||||
maintainers = teams.php.members;
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "phpmd";
|
||||
maintainers = lib.teams.php.members;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user