depot/third_party/nixpkgs/pkgs/os-specific/darwin/skhd/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

41 lines
909 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, Carbon
, Cocoa
}:
stdenv.mkDerivation (finalAttrs: {
pname = "skhd";
version = "0.3.9";
src = fetchFromGitHub {
owner = "koekeishiya";
repo = "skhd";
rev = "v${finalAttrs.version}";
hash = "sha256-fnkWws/g4BdHKDRhqoCpdPFUavOHdk8R7h7H1dAdAYI=";
};
buildInputs = [
Carbon
Cocoa
];
makeFlags = [
"BUILD_PATH=$(out)/bin"
];
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
'';
meta = {
description = "Simple hotkey daemon for macOS";
homepage = "https://github.com/koekeishiya/skhd";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cmacrae lnl7 periklis khaneliman];
platforms = lib.platforms.darwin;
};
})