tony / oxwm

nix: use zig build hook instead of manual build phase and fix installPhase Browse files
emzywastaken committed 2026-02-15 parent bc68fc0 commit 0e1568b4c1a0fd199fb4af8677922cb173d3ef08
Showing 1 changed file with 2 additions and 12 deletions. UnifiedSplit
+2 −12 default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: {
15 15
16 src = ./.; 16 src = ./.;
17 17
18 - nativeBuildInputs = [zig pkg-config]; 18 + nativeBuildInputs = [zig.hook pkg-config];
19 19
20 buildInputs = [ 20 buildInputs = [
21 xorg.libX11 21 xorg.libX11
@@ -26,20 +26,10 @@ stdenv.mkDerivation (finalAttrs: {
26 fontconfig 26 fontconfig
27 ]; 27 ];
28 28
29 - dontConfigure = true; 29 + postInstall = ''
30 -
31 - buildPhase = ''
32 - runHook preBuild
33 - zig build -Doptimize=ReleaseSafe --prefix $out
34 - runHook postBuild
35 - '';
36 -
37 - installPhase = ''
38 - runHook preInstall
39 install resources/oxwm.desktop -Dt $out/share/xsessions 30 install resources/oxwm.desktop -Dt $out/share/xsessions
40 install -Dm644 resources/oxwm.1 -t $out/share/man/man1 31 install -Dm644 resources/oxwm.1 -t $out/share/man/man1
41 install -Dm644 templates/oxwm.lua -t $out/share/oxwm 32 install -Dm644 templates/oxwm.lua -t $out/share/oxwm
42 - runHook postInstall
43 ''; 33 '';
44 34
45 # tests require a running X server 35 # tests require a running X server