2024-04-14 21:49:49 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
2024-11-01 00:09:43 +00:00
|
|
|
apple-sdk_11,
|
2024-10-31 14:41:27 +00:00
|
|
|
darwinMinVersionHook,
|
2024-04-14 21:49:49 +00:00
|
|
|
nix-update-script,
|
2024-11-01 00:09:43 +00:00
|
|
|
versionCheckHook,
|
2023-07-31 07:37:07 +00:00
|
|
|
}:
|
2024-10-31 14:41:27 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "skhd";
|
2023-07-31 02:36:19 +00:00
|
|
|
version = "0.3.9";
|
2018-03-05 18:29:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "koekeishiya";
|
2023-07-31 07:37:07 +00:00
|
|
|
repo = "skhd";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-fnkWws/g4BdHKDRhqoCpdPFUavOHdk8R7h7H1dAdAYI=";
|
2018-03-05 18:29:35 +00:00
|
|
|
};
|
|
|
|
|
2023-07-31 07:37:07 +00:00
|
|
|
buildInputs = [
|
2024-10-31 14:41:27 +00:00
|
|
|
apple-sdk_11
|
|
|
|
(darwinMinVersionHook "10.13")
|
2023-07-31 07:37:07 +00:00
|
|
|
];
|
2018-03-05 18:29:35 +00:00
|
|
|
|
2024-04-14 21:49:49 +00:00
|
|
|
makeFlags = [ "BUILD_PATH=$(out)/bin" ];
|
2018-03-05 18:29:35 +00:00
|
|
|
|
2023-11-17 09:42:34 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
|
|
|
|
2018-03-05 18:29:35 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/Library/LaunchDaemons
|
|
|
|
cp ${./org.nixos.skhd.plist} $out/Library/LaunchDaemons/org.nixos.skhd.plist
|
|
|
|
substituteInPlace $out/Library/LaunchDaemons/org.nixos.skhd.plist --subst-var out
|
|
|
|
'';
|
|
|
|
|
2024-11-01 00:09:43 +00:00
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
versionCheckProgramArg = "--version";
|
|
|
|
doInstallCheck = true;
|
2024-03-27 02:27:26 +00:00
|
|
|
|
2024-11-01 00:09:43 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2023-09-18 19:58:14 +00:00
|
|
|
|
2023-07-31 07:37:07 +00:00
|
|
|
meta = {
|
2018-03-05 18:29:35 +00:00
|
|
|
description = "Simple hotkey daemon for macOS";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/koekeishiya/skhd";
|
2023-07-31 07:37:07 +00:00
|
|
|
license = lib.licenses.mit;
|
2023-08-26 12:03:52 +00:00
|
|
|
mainProgram = "skhd";
|
2024-04-14 21:49:49 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
cmacrae
|
|
|
|
lnl7
|
|
|
|
periklis
|
|
|
|
khaneliman
|
|
|
|
];
|
2023-07-31 07:37:07 +00:00
|
|
|
platforms = lib.platforms.darwin;
|
2018-03-05 18:29:35 +00:00
|
|
|
};
|
2023-07-31 07:37:07 +00:00
|
|
|
})
|