| 1 | { |
| 2 | lib, |
| 3 | rustPlatform, |
| 4 | pkg-config, |
| 5 | xorg, |
| 6 | freetype, |
| 7 | fontconfig, |
| 8 | }: |
| 9 | rustPlatform.buildRustPackage (finalAttrs: { |
| 10 | pname = "oxwm"; |
| 11 | version = "0.4.0"; |
| 12 | |
| 13 | src = ./.; |
| 14 | |
| 15 | cargoLock = { |
| 16 | lockFile = ./Cargo.lock; |
| 17 | }; |
| 18 | |
| 19 | nativeBuildInputs = [ |
| 20 | pkg-config |
| 21 | ]; |
| 22 | |
| 23 | buildInputs = [ |
| 24 | xorg.libX11 |
| 25 | xorg.libXft |
| 26 | xorg.libXrender |
| 27 | freetype |
| 28 | fontconfig |
| 29 | ]; |
| 30 | |
| 31 | postInstall = '' |
| 32 | install resources/oxwm.desktop -Dt $out/share/xsessions |
| 33 | install -Dm644 resources/oxwm.1 -t $out/share/man/man1 |
| 34 | ''; |
| 35 | |
| 36 | passthru.providedSessions = ["oxwm"]; |
| 37 | |
| 38 | meta = with lib; { |
| 39 | description = "A dynamic window manager written in Rust, inspired by dwm"; |
| 40 | homepage = "https://github.com/tonybanters/oxwm"; |
| 41 | license = licenses.gpl3; |
| 42 | platforms = platforms.linux; |
| 43 | mainProgram = "oxwm"; |
| 44 | }; |
| 45 | }) |