flake: add a hack to fix build not finding libevdev/libevdev.h

This commit is contained in:
Asmir A 2023-09-03 20:11:47 +02:00
parent df0c3657b4
commit 468c4bd474

View File

@ -11,18 +11,23 @@
version = "0.1"; version = "0.1";
src = self; src = self;
nativeBuildInputs = [zig.hook]; nativeBuildInputs = [zig.hook];
buildInputs = [libevdev]; buildInputs = [libevdev pkg-config];
buildPhase = ''
NIX_CFLAGS_COMPILE="-isystem $(pkg-config --variable=includedir libevdev)/libevdev-1.0 $NIX_CFLAGS_COMPILE"
'';
}; };
devShells.x86_64-linux.default = with import nixpkgs {system = "x86_64-linux";}; devShells.x86_64-linux.default = with import nixpkgs {system = "x86_64-linux";};
mkShell { mkShell {
nativeBuildInputs = [zig];
buildInputs = [ buildInputs = [
libevdev libevdev
zig pkg-config
]; ];
shellHook = '' shellHook = ''
echo "happy hacking!" NIX_CFLAGS_COMPILE="-isystem $(pkg-config --variable=includedir libevdev)/libevdev-1.0 $NIX_CFLAGS_COMPILE"
echo "happy hacking!"
''; '';
}; };
}; };