1{
2 lib,
3 buildDubPackage,
4 fetchFromGitHub,
5 clang,
6 ldc,
7 which,
8}:
9buildDubPackage rec {
10 pname = "dstep";
11 version = "1.0.4";
12
13 src = fetchFromGitHub {
14 owner = "jacob-carlborg";
15 repo = "dstep";
16 rev = "v${version}";
17 hash = "sha256-ZFz2+GtBk3StqXo/9x47xrDFdz5XujHR62hj0p3AjcY=";
18 };
19
20 dubLock = ./dub-lock.json;
21
22 nativeBuildInputs = [
23 ldc
24 which
25 clang
26 ];
27
28 preConfigure = ''
29 ./configure --llvm-path ${lib.getLib clang.cc}
30 '';
31
32 installPhase = ''
33 runHook preInstall
34 install -Dm755 bin/dstep -t $out/bin
35 runHook postInstall
36 '';
37
38 meta = with lib; {
39 description = "Tool for converting C and Objective-C headers to D modules";
40 homepage = "https://github.com/jacob-carlborg/dstep";
41 license = licenses.boost;
42 mainProgram = "dstep";
43 maintainers = with maintainers; [ imrying ];
44 };
45}