tony / oxwm

Branch: c92066c
Switch branches/tags
master
tonybtw Updated with enums instead of raw function parsers 09996ed 2025-10-16
52 lines · 980 B Raw Blame History
1 {
2 lib,
3 rustPlatform,
4 pkg-config,
5 xorg,
6 freetype,
7 fontconfig,
8 makeDesktopItem,
9 }:
10 rustPlatform.buildRustPackage (finalAttrs: {
11 pname = "oxwm";
12 version = "0.2.0";
13
14 src = ./.;
15
16 cargoLock = {
17 lockFile = ./Cargo.lock;
18 };
19
20 nativeBuildInputs = [
21 pkg-config
22 ];
23
24 buildInputs = [
25 xorg.libX11
26 xorg.libXft
27 xorg.libXrender
28 freetype
29 fontconfig
30 ];
31
32 postInstall = let
33 oxwmDesktopItem = makeDesktopItem rec {
34 name = finalAttrs.pname;
35 exec = name;
36 desktopName = name;
37 comment = finalAttrs.meta.description;
38 };
39 in ''
40 install -Dt $out/share/xsessions ${oxwmDesktopItem}/share/applications/oxwm.desktop
41 '';
42
43 passthru.providedSessions = ["oxwm"];
44
45 meta = with lib; {
46 description = "A dynamic window manager written in Rust, inspired by dwm";
47 homepage = "https://github.com/tonybanters/oxwm";
48 license = licenses.gpl3;
49 platforms = platforms.linux;
50 mainProgram = "oxwm";
51 };
52 })