nixpkgs/pkgs/development/php-packages/box/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
957 B
Nix
Raw Normal View History

{ mkDerivation, fetchurl, makeWrapper, lib, php }:
2022-12-24 18:30:40 +00:00
let
pname = "box";
2022-12-24 18:30:40 +00:00
version = "4.2.0";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/box-project/box/releases/download/${version}/box.phar";
2022-12-24 18:30:40 +00:00
sha256 = "sha256-9pPhqFq9t3MKI/y6/7iCYB8ddWFrafGVcV/k+Exb+KQ=";
};
2021-08-01 21:59:46 +00:00
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
2022-03-13 15:37:51 +00:00
runHook preInstall
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
'';
meta = with lib; {
2022-12-24 18:30:40 +00:00
changelog = "https://github.com/box-project/box/releases/tag/${version}";
description = "An application for building and managing Phars";
license = licenses.mit;
homepage = "https://github.com/box-project/box";
maintainers = with maintainers; [ jtojnar ] ++ teams.php.members;
};
}