tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
phpPackages.phpstan: use `buildComposerProject` builder
Pol Dellaiera
2 years ago
a1e85db7
043a094c
+13
-25
1 changed file
expand all
collapse all
unified
split
pkgs
development
php-packages
phpstan
default.nix
+13
-25
pkgs/development/php-packages/phpstan/default.nix
···
1
1
-
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
1
1
+
{ fetchFromGitHub, lib, php }:
2
2
3
3
-
let
3
3
+
php.buildComposerProject (finalAttrs: {
4
4
pname = "phpstan";
5
5
version = "1.10.37";
6
6
-
in
7
7
-
mkDerivation {
8
8
-
inherit pname version;
9
6
10
10
-
src = fetchurl {
11
11
-
url = "https://github.com/phpstan/phpstan/releases/download/${version}/phpstan.phar";
12
12
-
sha256 = "sha256-i1h3N11MsKhHx/RJxAthnUbjacA5yZJF6bzmQnmEKzg=";
7
7
+
src = fetchFromGitHub {
8
8
+
owner = "phpstan";
9
9
+
repo = "phpstan-src";
10
10
+
rev = finalAttrs.version;
11
11
+
hash = "sha256-y55bfwE3H/oDCwDq3wrClyX8dhk0p6vEl/CMhqN6LkA=";
13
12
};
14
13
15
15
-
dontUnpack = true;
16
16
-
17
17
-
nativeBuildInputs = [ makeWrapper ];
18
18
-
19
19
-
installPhase = ''
20
20
-
runHook preInstall
21
21
-
mkdir -p $out/bin
22
22
-
install -D $src $out/libexec/phpstan/phpstan.phar
23
23
-
makeWrapper ${php}/bin/php $out/bin/phpstan \
24
24
-
--add-flags "$out/libexec/phpstan/phpstan.phar"
25
25
-
runHook postInstall
26
26
-
'';
14
14
+
vendorHash = "sha256-hjCfrmpn2rYgApenZkHX8fXqPXukh7BVKENkvwIk8Dk=";
27
15
28
28
-
meta = with lib; {
29
29
-
changelog = "https://github.com/phpstan/phpstan/releases/tag/${version}";
16
16
+
meta = {
17
17
+
changelog = "https://github.com/phpstan/phpstan/releases/tag/${finalAttrs.version}";
30
18
description = "PHP Static Analysis Tool";
31
19
longDescription = ''
32
20
PHPStan focuses on finding errors in your code without actually
···
35
23
sense that the correctness of each line of the code can be checked
36
24
before you run the actual line.
37
25
'';
38
38
-
license = licenses.mit;
26
26
+
license = lib.licenses.mit;
39
27
homepage = "https://github.com/phpstan/phpstan";
40
40
-
maintainers = teams.php.members;
28
28
+
maintainers = lib.teams.php.members;
41
29
};
42
42
-
}
30
30
+
})