tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
wmderland: init at 2020-07-17
takagiy
5 years ago
b2485104
7b8376e5
+153
6 changed files
expand all
collapse all
unified
split
nixos
tests
all-tests.nix
wmderland.nix
pkgs
applications
window-managers
wmderland
0001-remove-flto.patch
default.nix
wmderlandc
default.nix
top-level
all-packages.nix
+1
nixos/tests/all-tests.nix
···
371
371
virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};
372
372
wasabibackend = handleTest ./wasabibackend.nix {};
373
373
wireguard = handleTest ./wireguard {};
374
374
+
wmderland = handleTest ./wmderland.nix {};
374
375
wordpress = handleTest ./wordpress.nix {};
375
376
xandikos = handleTest ./xandikos.nix {};
376
377
xautolock = handleTest ./xautolock.nix {};
+54
nixos/tests/wmderland.nix
···
1
1
+
import ./make-test-python.nix ({ pkgs, ...} : {
2
2
+
name = "wmderland";
3
3
+
meta = with pkgs.stdenv.lib.maintainers; {
4
4
+
maintainers = [ takagiy ];
5
5
+
};
6
6
+
7
7
+
machine = { lib, ... }: {
8
8
+
imports = [ ./common/x11.nix ./common/user-account.nix ];
9
9
+
test-support.displayManager.auto.user = "alice";
10
10
+
services.xserver.displayManager.defaultSession = lib.mkForce "none+wmderland";
11
11
+
services.xserver.windowManager.wmderland.enable = true;
12
12
+
13
13
+
systemd.services.setupWmderlandConfig = {
14
14
+
wantedBy = [ "multi-user.target" ];
15
15
+
before = [ "multi-user.target" ];
16
16
+
environment = {
17
17
+
HOME = "/home/alice";
18
18
+
};
19
19
+
unitConfig = {
20
20
+
type = "oneshot";
21
21
+
RemainAfterExit = true;
22
22
+
user = "alice";
23
23
+
};
24
24
+
script = let
25
25
+
config = pkgs.writeText "config" ''
26
26
+
set $Mod = Mod1
27
27
+
bindsym $Mod+Return exec ${pkgs.xterm}/bin/xterm -cm -pc
28
28
+
'';
29
29
+
in ''
30
30
+
mkdir -p $HOME/.config/wmderland
31
31
+
cp ${config} $HOME/.config/wmderland/config
32
32
+
'';
33
33
+
};
34
34
+
};
35
35
+
36
36
+
testScript = { ... }: ''
37
37
+
with subtest("ensure x starts"):
38
38
+
machine.wait_for_x()
39
39
+
machine.wait_for_file("/home/alice/.Xauthority")
40
40
+
machine.succeed("xauth merge ~alice/.Xauthority")
41
41
+
42
42
+
with subtest("ensure we can open a new terminal"):
43
43
+
machine.send_key("alt-ret")
44
44
+
machine.wait_until_succeeds("pgrep xterm")
45
45
+
machine.wait_for_window(r"alice.*?machine")
46
46
+
machine.screenshot("terminal")
47
47
+
48
48
+
with subtest("ensure we can communicate through ipc with wmderlandc"):
49
49
+
# Kills the previously open xterm
50
50
+
machine.succeed("pgrep xterm")
51
51
+
machine.execute("DISPLAY=:0 wmderlandc kill")
52
52
+
machine.fail("pgrep xterm")
53
53
+
'';
54
54
+
})
+13
pkgs/applications/window-managers/wmderland/0001-remove-flto.patch
···
1
1
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
2
+
index 17a4944..33406f3 100644
3
3
+
--- a/CMakeLists.txt
4
4
+
+++ b/CMakeLists.txt
5
5
+
@@ -10,7 +10,7 @@ include(BuildType)
6
6
+
# Request C++14 standard, using new CMake variables.
7
7
+
set(CMAKE_CXX_STANDARD 14)
8
8
+
set(CMAKE_CXX_STANDARD_REQUIRED True)
9
9
+
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -Wall")
10
10
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
11
11
+
12
12
+
# If the BuildType is Debug, then add -rdynamic.
13
13
+
# (used to print stacktrace with function names)
+49
pkgs/applications/window-managers/wmderland/default.nix
···
1
1
+
{ lib, stdenv, fetchFromGitHub, cmake, libnotify, libX11, xorgproto, nixosTests }:
2
2
+
3
3
+
stdenv.mkDerivation {
4
4
+
pname = "wmderland";
5
5
+
version = "unstable-2020-07-17";
6
6
+
7
7
+
src = fetchFromGitHub {
8
8
+
owner = "aesophor";
9
9
+
repo = "wmderland";
10
10
+
rev = "a40a3505dd735b401d937203ab6d8d1978307d72";
11
11
+
sha256 = "0npmlnybblp82mfpinjbz7dhwqgpdqc1s63wc1zs8mlcs19pdh98";
12
12
+
};
13
13
+
14
14
+
nativeBuildInputs = [
15
15
+
cmake
16
16
+
];
17
17
+
18
18
+
cmakeBuildType = "MinSizeRel";
19
19
+
20
20
+
patches = [ ./0001-remove-flto.patch ];
21
21
+
22
22
+
postPatch = ''
23
23
+
substituteInPlace src/util.cc \
24
24
+
--replace "notify-send" "${libnotify}/bin/notify-send"
25
25
+
'';
26
26
+
27
27
+
buildInputs = [
28
28
+
libX11
29
29
+
xorgproto
30
30
+
];
31
31
+
32
32
+
postInstall = ''
33
33
+
install -Dm0644 -t $out/share/wmderland/contrib $src/example/config
34
34
+
install -Dm0644 -t $out/share/xsessions $src/example/wmderland.desktop
35
35
+
'';
36
36
+
37
37
+
passthru = {
38
38
+
tests.basic = nixosTests.wmderland;
39
39
+
providedSessions = [ "wmderland" ];
40
40
+
};
41
41
+
42
42
+
meta = with lib; {
43
43
+
description = "Modern and minimal X11 tiling window manager";
44
44
+
homepage = "https://github.com/aesophor/wmderland";
45
45
+
license = licenses.mit;
46
46
+
platforms = libX11.meta.platforms;
47
47
+
maintainers = with maintainers; [ takagiy ];
48
48
+
};
49
49
+
}
+32
pkgs/applications/window-managers/wmderlandc/default.nix
···
1
1
+
{ lib, stdenv, fetchFromGitHub, cmake, libX11, xorgproto }:
2
2
+
3
3
+
stdenv.mkDerivation {
4
4
+
pname = "wmderlandc";
5
5
+
version = "unstable-2020-07-17";
6
6
+
7
7
+
src = fetchFromGitHub {
8
8
+
owner = "aesophor";
9
9
+
repo = "wmderland";
10
10
+
rev = "a40a3505dd735b401d937203ab6d8d1978307d72";
11
11
+
sha256 = "0npmlnybblp82mfpinjbz7dhwqgpdqc1s63wc1zs8mlcs19pdh98";
12
12
+
};
13
13
+
14
14
+
sourceRoot = "source/ipc-client";
15
15
+
16
16
+
nativeBuildInputs = [
17
17
+
cmake
18
18
+
];
19
19
+
20
20
+
buildInputs = [
21
21
+
libX11
22
22
+
xorgproto
23
23
+
];
24
24
+
25
25
+
meta = with lib; {
26
26
+
description = "A tiny program to interact with wmderland";
27
27
+
homepage = "https://github.com/aesophor/wmderland/tree/master/ipc-client";
28
28
+
license = licenses.mit;
29
29
+
platforms = platforms.all;
30
30
+
maintainers = with maintainers; [ takagiy ];
31
31
+
};
32
32
+
}
+4
pkgs/top-level/all-packages.nix
···
24191
24191
24192
24192
wmctrl = callPackage ../tools/X11/wmctrl { };
24193
24193
24194
24194
+
wmderland = callPackage ../applications/window-managers/wmderland { };
24195
24195
+
24196
24196
+
wmderlandc = callPackage ../applications/window-managers/wmderlandc { };
24197
24197
+
24194
24198
wmii_hg = callPackage ../applications/window-managers/wmii-hg { };
24195
24199
24196
24200
wofi = callPackage ../applications/misc/wofi { };