nixpkgs/pkgs/os-specific/darwin/khd/default.nix

38 lines
966 B
Nix
Raw Normal View History

2017-01-24 07:31:11 +00:00
{ stdenv, fetchFromGitHub, Carbon, Cocoa }:
stdenv.mkDerivation rec {
name = "khd-${version}";
2017-03-04 17:00:58 +00:00
version = "2.1.1";
2017-01-24 07:31:11 +00:00
src = fetchFromGitHub {
owner = "koekeishiya";
repo = "khd";
rev = "v${version}";
2017-03-04 17:00:58 +00:00
sha256 = "1ijfrlnwdf8hk259j3jfxj6zizvqzj57458rflza626z5dnhmbpr";
2017-01-24 07:31:11 +00:00
};
buildInputs = [ Carbon Cocoa ];
buildPhase = ''
make install
'';
installPhase = ''
mkdir -p $out/bin
cp bin/khd $out/bin/khd
mkdir -p $out/Library/LaunchDaemons
cp ${./org.nixos.khd.plist} $out/Library/LaunchDaemons/org.nixos.khd.plist
substituteInPlace $out/Library/LaunchDaemons/org.nixos.khd.plist --subst-var out
'';
meta = with stdenv.lib; {
2017-03-04 17:00:58 +00:00
description = "A simple modal hotkey daemon for OSX";
2017-01-24 07:31:11 +00:00
homepage = https://github.com/koekeishiya/khd;
downloadPage = https://github.com/koekeishiya/khd/releases;
platforms = platforms.darwin;
maintainers = with maintainers; [ lnl7 ];
license = licenses.mit;
};
}