btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / ds / dstep / package.nix
blob8c847242e702af4a39b754a22105a856a531af41
1 { lib, buildDubPackage, fetchFromGitHub, clang, ldc, which }:
2 buildDubPackage rec {
3   pname = "dstep";
4   version = "1.0.4";
6   src = fetchFromGitHub {
7     owner = "jacob-carlborg";
8     repo = "dstep";
9     rev = "v${version}";
10     hash = "sha256-ZFz2+GtBk3StqXo/9x47xrDFdz5XujHR62hj0p3AjcY=";
11   };
13   dubLock = ./dub-lock.json;
15   nativeBuildInputs = [ ldc which clang ];
17   preConfigure = ''
18     ./configure --llvm-path ${lib.getLib clang.cc}
19   '';
21   installPhase = ''
22     runHook preInstall
23     install -Dm755 bin/dstep -t $out/bin
24     runHook postInstall
25   '';
27   meta = with lib; {
28     description = "Tool for converting C and Objective-C headers to D modules";
29     homepage = "https://github.com/jacob-carlborg/dstep";
30     license = licenses.boost;
31     mainProgram = "dstep";
32     maintainers = with maintainers; [ imrying ];
33   };