tony / oxwm

Branch: 4c2c740
Switch branches/tags
master
emzywastaken nix: use zig build hook instead of manual build phase and fix installPhase 0e1568b 2026-02-15
47 lines · 931 B Raw Blame History
1 {
2 lib,
3 stdenv,
4 zig,
5 pkg-config,
6 xorg,
7 lua5_4,
8 freetype,
9 fontconfig,
10 gitRev ? "unknown",
11 }:
12 stdenv.mkDerivation (finalAttrs: {
13 pname = "oxwm";
14 version = "${lib.substring 0 8 gitRev}";
15
16 src = ./.;
17
18 nativeBuildInputs = [zig.hook pkg-config];
19
20 buildInputs = [
21 xorg.libX11
22 xorg.libXinerama
23 xorg.libXft
24 lua5_4
25 freetype
26 fontconfig
27 ];
28
29 postInstall = ''
30 install resources/oxwm.desktop -Dt $out/share/xsessions
31 install -Dm644 resources/oxwm.1 -t $out/share/man/man1
32 install -Dm644 templates/oxwm.lua -t $out/share/oxwm
33 '';
34
35 # tests require a running X server
36 doCheck = false;
37
38 passthru.providedSessions = ["oxwm"];
39
40 meta = {
41 description = "Dynamic window manager written in Zig, inspired by dwm";
42 homepage = "https://github.com/tonybanters/oxwm";
43 license = lib.licenses.gpl3Only;
44 platforms = lib.platforms.linux;
45 mainProgram = "oxwm";
46 };
47 })