nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 33 lines 871 B view raw
1{ mkDerivation, fetchurl, makeWrapper, lib, php }: 2let 3 pname = "box"; 4 version = "3.16.0"; 5in 6mkDerivation { 7 inherit pname version; 8 9 src = fetchurl { 10 url = "https://github.com/box-project/box/releases/download/${version}/box.phar"; 11 sha256 = "sha256-9QjijzCdfpWjGb3NXxPc+7GOuRy3psrJtpvHeZ14vfk="; 12 }; 13 14 dontUnpack = true; 15 16 nativeBuildInputs = [ makeWrapper ]; 17 18 installPhase = '' 19 runHook preInstall 20 mkdir -p $out/bin 21 install -D $src $out/libexec/box/box.phar 22 makeWrapper ${php}/bin/php $out/bin/box \ 23 --add-flags "-d phar.readonly=0 $out/libexec/box/box.phar" 24 runHook postInstall 25 ''; 26 27 meta = with lib; { 28 description = "An application for building and managing Phars"; 29 license = licenses.mit; 30 homepage = "https://github.com/box-project/box"; 31 maintainers = with maintainers; [ ] ++ teams.php.members; 32 }; 33}