blob: 5ac6c5afa913ac0e7013f65ab9eeaf8fbe5ae7e6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{ stdenv, lib, fetchFromGitHub, crystal, shards }:
stdenv.mkDerivation rec {
pname = "ameba";
version = "0.11.0";
src = fetchFromGitHub {
owner = "crystal-ameba";
repo = "ameba";
rev = "v${version}";
sha256 = "0zjv59f555q2w8ahrvmpdzasrifwjgr0mk6rly9yss4ab3rj8cy2";
};
nativeBuildInputs = [ crystal shards ];
buildPhase = ''
runHook preBuild
shards build --release
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin bin/ameba
runHook postInstall
'';
doCheck = true;
checkPhase = ''
runHook preCheck
crystal spec
runHook postCheck
'';
meta = with stdenv.lib; {
description = "A static code analysis tool for Crystal";
homepage = https://crystal-ameba.github.io;
license = licenses.mit;
maintainers = with maintainers; [ kimburgess ];
};
}
|