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
1
{ lib
2
2
+
, fetchFromGitHub
2
3
, php
3
3
-
, mkDerivation
4
4
-
, fetchurl
5
5
-
, makeWrapper
6
4
}:
7
7
-
let
8
8
-
php' = php.withExtensions ({ enabled, all }: enabled ++ [ all.ast ]);
9
9
-
in
10
10
-
mkDerivation rec {
5
5
+
6
6
+
(php.withExtensions({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject (finalAttrs: {
11
7
pname = "phan";
12
8
version = "5.4.3";
13
9
14
14
-
src = fetchurl {
15
15
-
url = "https://github.com/phan/phan/releases/download/${version}/phan.phar";
16
16
-
hash = "sha256-wZU6YIlH0q18iD044y6Z5gSscBn7cI0AwRwZgT/YhOo=";
10
10
+
src = fetchFromGitHub {
11
11
+
owner = "phan";
12
12
+
repo = "phan";
13
13
+
rev = finalAttrs.version;
14
14
+
hash = "sha256-O0dtnDsz6X99B99VbRQf3Wr/xJfsJqd+2l5Z5iWxHyU=";
17
15
};
18
16
19
19
-
dontUnpack = true;
20
20
-
21
21
-
nativeBuildInputs = [ makeWrapper ];
17
17
+
vendorHash = "sha256-yE85MBseJa0VGV5EbjT0te4QT3697YvtumGkMMfZtxI=";
22
18
23
23
-
installPhase = ''
24
24
-
runHook preInstall
25
25
-
mkdir -p $out/bin
26
26
-
install -D $src $out/libexec/phan/phan.phar
27
27
-
makeWrapper ${php'}/bin/php $out/bin/phan \
28
28
-
--add-flags "$out/libexec/phan/phan.phar"
29
29
-
runHook postInstall
30
30
-
'';
31
31
-
32
32
-
meta = with lib; {
19
19
+
meta = {
33
20
description = "Static analyzer for PHP";
21
21
+
homepage = "https://github.com/phan/phan";
22
22
+
license = lib.licenses.mit;
34
23
longDescription = ''
35
24
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives
36
25
and attempts to prove incorrectness rather than correctness.
37
26
'';
38
38
-
license = licenses.mit;
39
39
-
homepage = "https://github.com/phan/phan";
40
40
-
maintainers = [ maintainers.apeschar ];
27
27
+
mainProgram = "phan";
28
28
+
maintainers = with lib.maintainers; [ apeschar ] ++ lib.teams.php.members;
41
29
};
42
42
-
}
30
30
+
})