From 0f91cdc45f943934a8317992326b43c4e68cda56 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 23 Jan 2017 21:45:01 +0100 Subject: [PATCH] kwm: init at 4.0.4 --- pkgs/os-specific/darwin/kwm/default.nix | 34 +++++++++++++++++++ .../darwin/kwm/org.nixos.kwm.plist | 26 ++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 62 insertions(+) create mode 100644 pkgs/os-specific/darwin/kwm/default.nix create mode 100644 pkgs/os-specific/darwin/kwm/org.nixos.kwm.plist diff --git a/pkgs/os-specific/darwin/kwm/default.nix b/pkgs/os-specific/darwin/kwm/default.nix new file mode 100644 index 000000000000..ac231f2dfe3d --- /dev/null +++ b/pkgs/os-specific/darwin/kwm/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchzip }: + +stdenv.mkDerivation rec { + name = "kwm-${version}"; + version = "4.0.4"; + + src = fetchzip { + stripRoot = false; + url = "https://github.com/koekeishiya/kwm/releases/download/v${version}/Kwm-${version}.zip"; + sha256 = "07rf4ichq511w8qmvd6s602s7xcyjhjp73d5c615sj82cxvgirwc"; + }; + + # TODO: Build this properly once we have swiftc. + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp kwmc $out/bin/kwmc + cp kwm overlaylib.dylib $out + + mkdir -p $out/Library/LaunchDaemons + cp ${./org.nixos.kwm.plist} $out/Library/LaunchDaemons/org.nixos.kwm.plist + substituteInPlace $out/Library/LaunchDaemons/org.nixos.kwm.plist --subst-var out + ''; + + meta = with stdenv.lib; { + description = "Tiling window manager with focus follows mouse for OSX"; + homepage = https://github.com/koekeishiya/kwm; + downloadPage = https://github.com/koekeishiya/kwm/releases; + platforms = platforms.darwin; + maintainers = with maintainers; [ lnl7 ]; + license = licenses.mit; + }; +} diff --git a/pkgs/os-specific/darwin/kwm/org.nixos.kwm.plist b/pkgs/os-specific/darwin/kwm/org.nixos.kwm.plist new file mode 100644 index 000000000000..eafce2ab4a46 --- /dev/null +++ b/pkgs/os-specific/darwin/kwm/org.nixos.kwm.plist @@ -0,0 +1,26 @@ + + + + + Label + org.nixos.kwm + ProgramArguments + + @out@/kwm + + KeepAlive + + Sockets + + Listeners + + SockServiceName + 3020 + SockType + dgram + SockFamily + IPv4 + + + + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 944f9c9d2258..5dd7ed8ad394 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -524,6 +524,8 @@ in oracle-instantclient = callPackage ../development/libraries/oracle-instantclient { }; + kwm = callPackage ../os-specific/darwin/kwm { }; + reattach-to-user-namespace = callPackage ../os-specific/darwin/reattach-to-user-namespace {}; install_name_tool = callPackage ../os-specific/darwin/install_name_tool { };