Merge pull request #293260 from r-ryantm/auto-update/odin
[NixPkgs.git] / pkgs / os-specific / darwin / kwm / default.nix
blobc210f9e8c65dd1b7fbd576188309762bdee25b8f
1 { lib, stdenv, fetchzip }:
3 stdenv.mkDerivation rec {
4   pname = "kwm";
5   version = "4.0.5";
7   src = fetchzip {
8     stripRoot = false;
9     url = "https://github.com/koekeishiya/kwm/releases/download/v${version}/Kwm-${version}.zip";
10     sha256 = "1ld1vblg3hmc6lpb8p2ljvisbkijjkijf4y87z5y1ia4k8pk7mxb";
11   };
13   # TODO: Build this properly once we have swiftc.
14   dontBuild = true;
16   installPhase = ''
17     mkdir -p $out/bin
18     cp kwmc $out/bin/kwmc
19     cp kwm overlaylib.dylib $out
21     mkdir -p $out/Library/LaunchDaemons
22     cp ${./org.nixos.kwm.plist} $out/Library/LaunchDaemons/org.nixos.kwm.plist
23     substituteInPlace $out/Library/LaunchDaemons/org.nixos.kwm.plist --subst-var out
24   '';
26   meta = with lib; {
27     description = "Tiling window manager with focus follows mouse for OSX";
28     homepage = "https://github.com/koekeishiya/kwm";
29     downloadPage = "https://github.com/koekeishiya/kwm/releases";
30     platforms = platforms.darwin;
31     maintainers = with maintainers; [ lnl7 ];
32     mainProgram = "kwmc";
33     license = licenses.mit;
34   };