nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 31 lines 852 B view raw
1{ mkDerivation, fetchurl, makeWrapper, lib, php }: 2 3mkDerivation rec { 4 pname = "phive"; 5 version = "0.15.0"; 6 7 src = fetchurl { 8 url = "https://github.com/phar-io/phive/releases/download/${version}/phive-${version}.phar"; 9 sha256 = "sha256-crMr8d5nsVt7+zQ5xPeph/JXmTEn6jJFVtp3mOgylB4="; 10 }; 11 12 dontUnpack = true; 13 14 nativeBuildInputs = [ makeWrapper ]; 15 16 installPhase = '' 17 runHook preInstall 18 mkdir -p $out/bin 19 install -D $src $out/libexec/phive/phive.phar 20 makeWrapper ${php}/bin/php $out/bin/phive \ 21 --add-flags "$out/libexec/phive/phive.phar" 22 runHook postInstall 23 ''; 24 25 meta = with lib; { 26 description = "The Phar Installation and Verification Environment (PHIVE)"; 27 homepage = "https://github.com/phar-io/phive"; 28 license = licenses.bsd3; 29 maintainers = with maintainers; teams.php.members; 30 }; 31}