blob: 64158fadbc98617769e1be112f0b541166054447 (
plain)
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
43
44
45
46
47
48
49
50
51
52
|
{
lib,
buildDubPackage,
fetchFromGitHub,
versionCheckHook,
}:
buildDubPackage rec {
pname = "dscanner";
version = "0.15.2";
src = fetchFromGitHub {
owner = "dlang-community";
repo = "D-Scanner";
tag = "v${version}";
hash = "sha256-7lZhYlK07VWpSRnzawJ2RL69/U/AH/qPyQY4VfbnVn4=";
};
preBuild = ''
mkdir -p bin/
echo "v${version}" > bin/dubhash.txt
'';
patches = [
./fix_version.patch
];
dubLock = ./dub-lock.json;
doCheck = true;
installPhase = ''
runHook preInstall
install -Dm755 bin/dscanner -t $out/bin
runHook postInstall
'';
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
meta = {
description = "Swiss-army knife for D source code";
changelog = "https://github.com/dlang-community/D-Scanner/releases/tag/v${version}";
homepage = "https://github.com/dlang-community/D-Scanner";
mainProgram = "dscanner";
maintainers = with lib.maintainers; [ ipsavitsky ];
license = lib.licenses.boost;
};
}
|