2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-30 17:43:42 +00:00
nixpkgs/pkgs/os-specific/darwin/skhd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

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: {
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";
homepage = "https://github.com/koekeishiya/skhd";
2023-07-31 07:37:07 +00:00
license = lib.licenses.mit;
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
})