Merge pull request #36351 from LnL7/skhd

skhd: init at 0.0.10
This commit is contained in:
Daiderd Jordan 2018-03-08 21:03:55 +01:00 committed by GitHub
commit 697847bfe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,34 @@
{ stdenv, fetchFromGitHub, Carbon }:
stdenv.mkDerivation rec {
name = "skhd-${version}";
version = "0.0.10";
src = fetchFromGitHub {
owner = "koekeishiya";
repo = "skhd";
rev = "v${version}";
sha256 = "0a0r8z9bvb1pzqag7nqa84xm99n0xvg27cw11qcv65snr06bqc9w";
};
buildInputs = [ Carbon ];
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
'';
# See https://github.com/koekeishiya/skhd/issues/28
hardeningDisable = [ "all" ];
meta = with stdenv.lib; {
description = "Simple hotkey daemon for macOS";
homepage = https://github.com/koekeishiya/skhd;
platforms = platforms.darwin;
maintainers = with maintainers; [ lnl7 ];
license = licenses.mit;
};
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.nixos.skhd</string>
<key>ProgramArguments</key>
<array>
<string>@out@/bin/skhd</string>
</array>
<key>ProcessType</key>
<string>Interactive</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>@out@/bin:/nix/var/nix/profiles/default/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>

View File

@ -676,6 +676,10 @@ with pkgs;
reattach-to-user-namespace = callPackage ../os-specific/darwin/reattach-to-user-namespace {}; reattach-to-user-namespace = callPackage ../os-specific/darwin/reattach-to-user-namespace {};
skhd = callPackage ../os-specific/darwin/skhd {
inherit (darwin.apple_sdk.frameworks) Carbon;
};
qes = callPackage ../os-specific/darwin/qes { qes = callPackage ../os-specific/darwin/qes {
inherit (darwin.apple_sdk.frameworks) Carbon; inherit (darwin.apple_sdk.frameworks) Carbon;
}; };