2021-02-27 10:29:20 +00:00
|
|
|
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
2020-10-11 15:33:54 +01:00
|
|
|
let
|
|
|
|
pname = "box";
|
2022-05-12 10:42:27 +01:00
|
|
|
version = "3.16.0";
|
2020-10-11 15:33:54 +01:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2022-05-12 10:42:27 +01:00
|
|
|
url = "https://github.com/box-project/box/releases/download/${version}/box.phar";
|
|
|
|
sha256 = "sha256-9QjijzCdfpWjGb3NXxPc+7GOuRy3psrJtpvHeZ14vfk=";
|
2020-10-11 15:33:54 +01:00
|
|
|
};
|
|
|
|
|
2021-08-01 22:59:46 +01:00
|
|
|
dontUnpack = true;
|
|
|
|
|
2021-02-27 10:29:20 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-10-11 15:33:54 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-13 15:37:51 +00:00
|
|
|
runHook preInstall
|
2020-10-11 15:33:54 +01: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-13 15:37:51 +00:00
|
|
|
runHook postInstall
|
2020-10-11 15:33:54 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An application for building and managing Phars";
|
|
|
|
license = licenses.mit;
|
2022-05-12 10:42:27 +01:00
|
|
|
homepage = "https://github.com/box-project/box";
|
2020-10-11 15:33:54 +01:00
|
|
|
maintainers = with maintainers; [ jtojnar ] ++ teams.php.members;
|
|
|
|
};
|
|
|
|
}
|