@@ -0,0 +1,31 @@
1+{ mkDerivation, fetchurl, makeWrapper, lib, php }:
2+
3+mkDerivation 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+}