fix display wakeup
This commit is contained in:
4 files changed
+638
No files matched your search
@@ -0,0 +1,37 @@
|
||||
{ lib, stdenv, zig, xorg }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hdmi-relink";
|
||||
version = "0.4.0";
|
||||
|
||||
src = ./src;
|
||||
|
||||
nativeBuildInputs = [ zig ];
|
||||
buildInputs = [ xorg.libxcb ];
|
||||
|
||||
# build-exe rather than `zig build`: this is one dependency-free file, and it
|
||||
# avoids build.zig.zon, whose schema has churned across zig releases
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
export ZIG_GLOBAL_CACHE_DIR="$TMPDIR/zig-cache"
|
||||
zig build-exe main.zig \
|
||||
-OReleaseSafe -lc \
|
||||
-I${lib.getDev xorg.libxcb}/include \
|
||||
-L${lib.getLib xorg.libxcb}/lib \
|
||||
-lxcb -lxcb-randr -lxcb-dpms -lxcb-screensaver \
|
||||
--name hdmi-relink
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 hdmi-relink $out/bin/hdmi-relink
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Re-initialise a wedged HDMI TMDS link on wake";
|
||||
mainProgram = "hdmi-relink";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user