2021-03-09 03:18:52 +00:00
|
|
|
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
let
|
|
|
|
pname = "box";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "4.2.0";
|
2020-10-16 20:44:37 +00:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2022-05-18 14:49:53 +00:00
|
|
|
url = "https://github.com/box-project/box/releases/download/${version}/box.phar";
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-9pPhqFq9t3MKI/y6/7iCYB8ddWFrafGVcV/k+Exb+KQ=";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
dontUnpack = true;
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
runHook preInstall
|
2020-10-16 20:44:37 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
install -D $src $out/libexec/box/box.phar
|
|
|
|
makeWrapper ${php}/bin/php $out/bin/box \
|
|
|
|
--add-flags "-d phar.readonly=0 $out/libexec/box/box.phar"
|
2022-03-30 09:31:56 +00:00
|
|
|
runHook postInstall
|
2020-10-16 20:44:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/box-project/box/releases/tag/${version}";
|
2020-10-16 20:44:37 +00:00
|
|
|
description = "An application for building and managing Phars";
|
|
|
|
license = licenses.mit;
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/box-project/box";
|
2020-10-16 20:44:37 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar ] ++ teams.php.members;
|
|
|
|
};
|
|
|
|
}
|