oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git
958 bytes raw
1
{
2
  lib,
3
  rustPlatform,
4
  pkg-config,
5
  libX11,
6
  libXft,
7
  libXrender,
8
  freetype,
9
  fontconfig,
10
  gitRev ? "unkown",
11
}:
12
rustPlatform.buildRustPackage (finalAttrs: {
13
  pname = "oxwm";
14
  version = "${lib.substring 0 8 gitRev}";
15
16
  src = ./.;
17
18
  cargoLock.lockFile = ./Cargo.lock;
19
20
  nativeBuildInputs = [pkg-config];
21
22
  buildInputs = [
23
    libX11
24
    libXft
25
    libXrender
26
    freetype
27
    fontconfig
28
  ];
29
30
  # tests require a running X server
31
  doCheck = false;
32
33
  postInstall = ''
34
    install resources/oxwm.desktop -Dt $out/share/xsessions
35
    install -Dm644 resources/oxwm.1 -t $out/share/man/man1
36
    install -Dm644 templates/oxwm.lua -t $out/share/oxwm
37
  '';
38
39
  passthru.providedSessions = ["oxwm"];
40
41
  meta = {
42
    description = "Dynamic window manager written in Rust, inspired by dwm";
43
    homepage = "https://github.com/tonybanters/oxwm";
44
    license = lib.licenses.gpl3Only;
45
    platforms = lib.platforms.linux;
46
    mainProgram = "oxwm";
47
  };
48
})