tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
phpPackages.phan: use `buildComposerProject` builder
Pol Dellaiera
2 years ago
d653d780
7491aa43
+15
-27
1 changed file
expand all
collapse all
unified
split
pkgs
development
php-packages
phan
default.nix
+15
-27
pkgs/development/php-packages/phan/default.nix
···
1
{ lib
0
2
, php
3
-
, mkDerivation
4
-
, fetchurl
5
-
, makeWrapper
6
}:
7
-
let
8
-
php' = php.withExtensions ({ enabled, all }: enabled ++ [ all.ast ]);
9
-
in
10
-
mkDerivation rec {
11
pname = "phan";
12
version = "5.4.3";
13
14
-
src = fetchurl {
15
-
url = "https://github.com/phan/phan/releases/download/${version}/phan.phar";
16
-
hash = "sha256-wZU6YIlH0q18iD044y6Z5gSscBn7cI0AwRwZgT/YhOo=";
0
0
17
};
18
19
-
dontUnpack = true;
20
-
21
-
nativeBuildInputs = [ makeWrapper ];
22
23
-
installPhase = ''
24
-
runHook preInstall
25
-
mkdir -p $out/bin
26
-
install -D $src $out/libexec/phan/phan.phar
27
-
makeWrapper ${php'}/bin/php $out/bin/phan \
28
-
--add-flags "$out/libexec/phan/phan.phar"
29
-
runHook postInstall
30
-
'';
31
-
32
-
meta = with lib; {
33
description = "Static analyzer for PHP";
0
0
34
longDescription = ''
35
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives
36
and attempts to prove incorrectness rather than correctness.
37
'';
38
-
license = licenses.mit;
39
-
homepage = "https://github.com/phan/phan";
40
-
maintainers = [ maintainers.apeschar ];
41
};
42
-
}
···
1
{ lib
2
+
, fetchFromGitHub
3
, php
0
0
0
4
}:
5
+
6
+
(php.withExtensions({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject (finalAttrs: {
0
0
7
pname = "phan";
8
version = "5.4.3";
9
10
+
src = fetchFromGitHub {
11
+
owner = "phan";
12
+
repo = "phan";
13
+
rev = finalAttrs.version;
14
+
hash = "sha256-O0dtnDsz6X99B99VbRQf3Wr/xJfsJqd+2l5Z5iWxHyU=";
15
};
16
17
+
vendorHash = "sha256-yE85MBseJa0VGV5EbjT0te4QT3697YvtumGkMMfZtxI=";
0
0
18
19
+
meta = {
0
0
0
0
0
0
0
0
0
20
description = "Static analyzer for PHP";
21
+
homepage = "https://github.com/phan/phan";
22
+
license = lib.licenses.mit;
23
longDescription = ''
24
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives
25
and attempts to prove incorrectness rather than correctness.
26
'';
27
+
mainProgram = "phan";
28
+
maintainers = with lib.maintainers; [ apeschar ] ++ lib.teams.php.members;
0
29
};
30
+
})