nixpkgs/pkgs/development/php-packages/box/default.nix
Jan Tojnar a2f49342d8 treewide: Reduce jtojnar maintainership
Notably fwupd, pipewire and flatpak.
I want to focus on GNOME and other packages I still actually use.
Pipewire is still important but I have not touched the packaging in a while.
2023-05-20 16:40:17 +02:00

36 lines
949 B
Nix

{ mkDerivation, fetchurl, makeWrapper, lib, php }:
let
pname = "box";
version = "4.2.0";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/box-project/box/releases/download/${version}/box.phar";
sha256 = "sha256-9pPhqFq9t3MKI/y6/7iCYB8ddWFrafGVcV/k+Exb+KQ=";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
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"
runHook postInstall
'';
meta = with lib; {
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; [ ] ++ teams.php.members;
};
}