about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/kdoctor/default.nix
blob: 9ef755afbcaff5b4bada26050588ff3e2ff1aa3a (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
43
{ lib
, stdenv
, fetchurl
, unzip
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "kdoctor";
  version = "1.0.1";

  src = fetchurl {
    url = "https://github.com/Kotlin/${finalAttrs.pname}/releases/download/v${finalAttrs.version}/kdoctor_${finalAttrs.version}+92.zip";
    hash = "sha256-rGK5U1JeXID9OcT8uzO3oO6f9MZgrW69LUHbEtj0SSQ=";
  };

  nativeBuildInputs = [ unzip ];

  unpackPhase = ''
    runHook preUnpack
    unzip $src -x META-INF/*
    runHook postUnpack
  '';

  installPhase = ''
    runHook preInstall
    install -Dm755 kdoctor -t $out/bin/
    runHook postInstall
  '';

  meta = with lib; {
    description = "Environment analysis tool for Kotlin Multiplatform Mobile";
    longDescription = ''
      KDoctor is a command-line tool that helps to set up the environment for
      Kotlin Multiplatform Mobile app development.
    '';
    homepage = "https://github.com/Kotlin/kdoctor";
    license = licenses.asl20;
    mainProgram = "kdoctor";
    maintainers = with maintainers; [ sironheart ];
    platforms = platforms.darwin;
    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
  };
})