about summary refs log tree commit diff
path: root/pkgs/applications/misc/has/default.nix
blob: 6fa84195a2f067ab3d2f07f2c8682690fc6c2a20 (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
{ lib, stdenvNoCC, fetchFromGitHub }:

stdenvNoCC.mkDerivation (finalAttrs: rec {
  pname = "has";
  version = "1.5.0";

  src = fetchFromGitHub {
    owner = "kdabir";
    repo = "has";
    rev = "v${finalAttrs.version}";
    hash = "sha256-TL8VwFx2tf+GkBwz0ILQg0pwcLJSTky57Wx9OW5+lS4=";
  };

  dontBuild = true;

  installPhase = ''
    runHook preInstall
    install -Dm0555 ${pname} -t $out/bin
    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://github.com/kdabir/has";
    description = "Checks presence of various command line tools and their versions on the path";
    license = licenses.mit;
    maintainers = with maintainers; [ Freed-Wu ];
    platforms = platforms.unix;
    mainProgram = "has";
  };
})