about summary refs log tree commit diff
path: root/pkgs/by-name/ke/keycastr/package.nix
blob: 8259a8bb400de81f733c06b748506069ab41eb61 (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
{
  stdenvNoCC,
  lib,
  fetchurl,
  unzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "keycastr";
  version = "0.9.18";

  src = fetchurl {
    url = "https://github.com/keycastr/keycastr/releases/download/v${finalAttrs.version}/KeyCastr.app.zip";
    hash = "sha256-q12c/W0yGoVL+wx+T/gaevx2P0Xwcv0a0FMv7bKfUnE=";
  };

  sourceRoot = ".";

  nativeBuildInputs = [ unzip ];

  installPhase = ''
    runHook preInstall
    mkdir -p $out/Applications
    cp -r KeyCastr.app $out/Applications/
    runHook postInstall
  '';

  meta = {
    homepage = "https://github.com/keycastr/keycastr";
    description = "Open-source keystroke visualizer";
    license = lib.licenses.bsd3;
    platforms = lib.platforms.darwin;
    maintainers = with lib.maintainers; [ matteopacini ];
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
  };
})