| 1 |
{
|
| 2 |
lib,
|
| 3 |
rustPlatform,
|
| 4 |
pkg-config,
|
| 5 |
xorg,
|
| 6 |
freetype,
|
| 7 |
fontconfig,
|
| 8 |
gitRev ? "unkown",
|
| 9 |
}:
|
| 10 |
rustPlatform.buildRustPackage (finalAttrs: {
|
| 11 |
pname = "oxwm";
|
| 12 |
version = "${lib.substring 0 8 gitRev}";
|
| 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 |
doCheck = false;
|
| 33 |
|
| 34 |
postInstall = ''
|
| 35 |
install resources/oxwm.desktop -Dt $out/share/xsessions
|
| 36 |
install -Dm644 resources/oxwm.1 -t $out/share/man/man1
|
| 37 |
install -Dm644 templates/oxwm.lua -t $out/share/oxwm
|
| 38 |
'';
|
| 39 |
|
| 40 |
passthru.providedSessions = ["oxwm"];
|
| 41 |
|
| 42 |
meta = with lib; {
|
| 43 |
description = "A dynamic window manager written in Rust, inspired by dwm";
|
| 44 |
homepage = "https://github.com/tonybanters/oxwm";
|
| 45 |
license = licenses.gpl3;
|
| 46 |
platforms = platforms.linux;
|
| 47 |
mainProgram = "oxwm";
|
| 48 |
};
|
| 49 |
})
|