Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.05 32 lines 921 B view raw
1{ mkDerivation, fetchurl, makeWrapper, lib, php }: 2 3mkDerivation rec { 4 pname = "phive"; 5 version = "0.15.2"; 6 7 src = fetchurl { 8 url = "https://github.com/phar-io/phive/releases/download/${version}/phive-${version}.phar"; 9 sha256 = "K7B2dT7F1nL14vlql6D+fo6ewkpDnu0A/SnvlCx5Bfk="; 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 changelog = "https://github.com/phar-io/phive/releases/tag/${version}"; 27 description = "The Phar Installation and Verification Environment (PHIVE)"; 28 homepage = "https://github.com/phar-io/phive"; 29 license = licenses.bsd3; 30 maintainers = with maintainers; teams.php.members; 31 }; 32}