2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, php
|
|
|
|
, fetchFromGitHub
|
2024-05-15 15:35:15 +00:00
|
|
|
, makeBinaryWrapper
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
php.buildComposerProject (finalAttrs: {
|
|
|
|
pname = "phpdocumentor";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "3.5.2";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phpDocumentor";
|
|
|
|
repo = "phpDocumentor";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-7gW6iqMOcWBaxCFlE5C3K6jjdu5t4lIuL4sXai0Uw9s=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
vendorHash = "sha256-VNlAzWueF7ZXBpr9RrJghMPrAUof7f1DCh1osFIwFfs=";
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# Needed because of the unbound version constraint on phpdocumentor/json-path
|
|
|
|
composerStrictValidation = false;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
wrapProgram "$out/bin/phpdoc" \
|
|
|
|
--set-default APP_CACHE_DIR /tmp \
|
|
|
|
--set-default APP_LOG_DIR /tmp/log
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/phpDocumentor/phpDocumentor/releases/tag/v${finalAttrs.version}";
|
|
|
|
description = "PHP documentation generator";
|
|
|
|
homepage = "https://phpdoc.org";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
mainProgram = "phpdoc";
|
|
|
|
maintainers = with lib.maintainers; [ drupol ];
|
|
|
|
};
|
|
|
|
})
|