ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / sk / skhd / package.nix
blob60321fae3557a8cca3d0ef55664f9286dabe5490
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   apple-sdk_11,
6   darwinMinVersionHook,
7   nix-update-script,
8   versionCheckHook,
9 }:
10 stdenv.mkDerivation (finalAttrs: {
11   pname = "skhd";
12   version = "0.3.9";
14   src = fetchFromGitHub {
15     owner = "koekeishiya";
16     repo = "skhd";
17     rev = "v${finalAttrs.version}";
18     hash = "sha256-fnkWws/g4BdHKDRhqoCpdPFUavOHdk8R7h7H1dAdAYI=";
19   };
21   buildInputs = [
22     apple-sdk_11
23     (darwinMinVersionHook "10.13")
24   ];
26   makeFlags = [ "BUILD_PATH=$(out)/bin" ];
28   env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
30   postInstall = ''
31     mkdir -p $out/Library/LaunchDaemons
32     cp ${./org.nixos.skhd.plist} $out/Library/LaunchDaemons/org.nixos.skhd.plist
33     substituteInPlace $out/Library/LaunchDaemons/org.nixos.skhd.plist --subst-var out
34   '';
36   nativeInstallCheckInputs = [ versionCheckHook ];
37   versionCheckProgramArg = "--version";
38   doInstallCheck = true;
40   passthru.updateScript = nix-update-script { };
42   meta = {
43     description = "Simple hotkey daemon for macOS";
44     homepage = "https://github.com/koekeishiya/skhd";
45     license = lib.licenses.mit;
46     mainProgram = "skhd";
47     maintainers = with lib.maintainers; [
48       cmacrae
49       lnl7
50       periklis
51       khaneliman
52     ];
53     platforms = lib.platforms.darwin;
54   };