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.

51 lines
1.1 KiB
Nix
Raw Normal View History

2023-07-31 10:37:07 +03:00
{ lib
, stdenv
, fetchFromGitHub
, Carbon
, Cocoa
2023-09-18 22:58:14 +03:00
, testers
2023-07-31 10:37:07 +03:00
}:
2018-03-05 21:29:35 +03:00
2023-07-31 10:37:07 +03:00
stdenv.mkDerivation (finalAttrs: {
pname = "skhd";
2023-07-31 05:36:19 +03:00
version = "0.3.9";
2018-03-05 21:29:35 +03:00
src = fetchFromGitHub {
owner = "koekeishiya";
2023-07-31 10:37:07 +03:00
repo = "skhd";
rev = "v${finalAttrs.version}";
hash = "sha256-fnkWws/g4BdHKDRhqoCpdPFUavOHdk8R7h7H1dAdAYI=";
2018-03-05 21:29:35 +03:00
};
2023-07-31 10:37:07 +03:00
buildInputs = [
Carbon
Cocoa
];
2018-03-05 21:29:35 +03:00
2023-07-31 10:37:07 +03:00
makeFlags = [
"BUILD_PATH=$(out)/bin"
];
2018-03-05 21:29:35 +03:00
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
2018-03-05 21:29:35 +03: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 22:58:14 +03:00
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
version = "skhd-v${finalAttrs.version}";
};
2023-07-31 10:37:07 +03:00
meta = {
2018-03-05 21:29:35 +03:00
description = "Simple hotkey daemon for macOS";
homepage = "https://github.com/koekeishiya/skhd";
2023-07-31 10:37:07 +03:00
license = lib.licenses.mit;
mainProgram = "skhd";
maintainers = with lib.maintainers; [ cmacrae lnl7 periklis khaneliman ];
2023-07-31 10:37:07 +03:00
platforms = lib.platforms.darwin;
2018-03-05 21:29:35 +03:00
};
2023-07-31 10:37:07 +03:00
})