about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/window-managers/wmderland/default.nix
blob: c0fcdd859b21f421532368bce932696d6306527a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib, stdenv, fetchFromGitHub, cmake, libnotify, libX11, xorgproto, nixosTests }:

stdenv.mkDerivation {
  pname = "wmderland";
  version = "unstable-2020-07-17";

  src = fetchFromGitHub {
    owner = "aesophor";
    repo = "wmderland";
    rev = "a40a3505dd735b401d937203ab6d8d1978307d72";
    sha256 = "0npmlnybblp82mfpinjbz7dhwqgpdqc1s63wc1zs8mlcs19pdh98";
  };

  nativeBuildInputs = [
    cmake
  ];

  cmakeBuildType = "MinSizeRel";

  patches = [ ./0001-remove-flto.patch ];

  postPatch = ''
    substituteInPlace src/util.cc \
      --replace "notify-send" "${libnotify}/bin/notify-send"
  '';

  buildInputs = [
    libX11
    xorgproto
  ];

  postInstall = ''
    install -Dm0644 -t $out/share/wmderland/contrib $src/example/config
    install -Dm0644 -t $out/share/xsessions $src/example/wmderland.desktop
  '';

  passthru = {
    tests.basic = nixosTests.wmderland;
    providedSessions = [ "wmderland" ];
  };

  meta = with lib; {
    description = "Modern and minimal X11 tiling window manager";
    homepage = "https://github.com/aesophor/wmderland";
    license = licenses.mit;
    platforms = libX11.meta.platforms;
    maintainers = with maintainers; [ takagiy ];
  };
}