2023-07-31 07:37:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, Carbon
|
|
|
|
, Cocoa
|
2023-09-18 19:58:14 +00:00
|
|
|
, testers
|
2023-07-31 07:37:07 +00:00
|
|
|
}:
|
2018-03-05 18:29:35 +00:00
|
|
|
|
2023-07-31 07:37:07 +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 = [
|
|
|
|
Carbon
|
|
|
|
Cocoa
|
|
|
|
];
|
2018-03-05 18:29:35 +00:00
|
|
|
|
2023-07-31 07:37:07 +00:00
|
|
|
makeFlags = [
|
|
|
|
"BUILD_PATH=$(out)/bin"
|
|
|
|
];
|
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
|
|
|
|
'';
|
|
|
|
|
2023-09-18 19:58:14 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
version = "skhd-v${finalAttrs.version}";
|
|
|
|
};
|
|
|
|
|
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";
|
|
|
|
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
|
|
|
})
|