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

32 lines
839 B
Nix
Raw Normal View History

2018-03-05 18:29:35 +00:00
{ stdenv, fetchFromGitHub, Carbon }:
stdenv.mkDerivation rec {
name = "skhd-${version}";
2018-05-10 18:16:03 +01:00
version = "0.1.1";
2018-03-05 18:29:35 +00:00
src = fetchFromGitHub {
owner = "koekeishiya";
repo = "skhd";
rev = "v${version}";
2018-05-10 18:16:03 +01:00
sha256 = "1wh7v90ydh27gbaiwn2r6ncx6yiic4mph3w9vi1282nz2q02zxss";
2018-03-05 18:29:35 +00:00
};
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
'';
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;
};
}