zremap/flake.nix
2024-07-16 10:56:43 +02:00

35 lines
951 B
Nix

{
description = "zremap nix flake";
outputs = {
self,
nixpkgs,
}: {
defaultPackage.x86_64-linux = with import nixpkgs {system = "x86_64-linux";};
stdenv.mkDerivation {
pname = "zremap";
version = "0.2";
src = self;
nativeBuildInputs = [zig.hook];
buildInputs = [libevdev pkg-config];
buildPhase = ''
NIX_CFLAGS_COMPILE="-static -isystem $(pkg-config --variable=includedir libevdev)/libevdev-1.0 $NIX_CFLAGS_COMPILE"
'';
};
devShells.x86_64-linux.default = with import nixpkgs {system = "x86_64-linux";};
mkShell {
nativeBuildInputs = [zig_0_12 lldb];
buildInputs = [
libevdev
pkg-config
];
shellHook = ''
NIX_CFLAGS_COMPILE="-isystem $(pkg-config --variable=includedir libevdev)/libevdev-1.0 $NIX_CFLAGS_COMPILE"
echo "happy hacking!"
'';
};
};
}