zremap/flake.nix

35 lines
951 B
Nix
Raw Permalink Normal View History

2023-08-27 20:32:47 +02:00
{
description = "zremap nix flake";
2023-09-02 22:25:09 +02:00
outputs = {
self,
nixpkgs,
}: {
defaultPackage.x86_64-linux = with import nixpkgs {system = "x86_64-linux";};
2023-08-27 20:32:47 +02:00
stdenv.mkDerivation {
pname = "zremap";
2024-07-16 10:56:43 +02:00
version = "0.2";
2023-08-27 20:32:47 +02:00
src = self;
2023-09-02 22:25:09 +02:00
nativeBuildInputs = [zig.hook];
buildInputs = [libevdev pkg-config];
buildPhase = ''
2024-07-16 10:34:44 +02:00
NIX_CFLAGS_COMPILE="-static -isystem $(pkg-config --variable=includedir libevdev)/libevdev-1.0 $NIX_CFLAGS_COMPILE"
'';
2023-09-02 22:25:09 +02:00
};
devShells.x86_64-linux.default = with import nixpkgs {system = "x86_64-linux";};
mkShell {
2024-07-16 10:56:43 +02:00
nativeBuildInputs = [zig_0_12 lldb];
2023-09-02 22:25:09 +02:00
buildInputs = [
libevdev
pkg-config
2023-09-02 22:25:09 +02:00
];
shellHook = ''
NIX_CFLAGS_COMPILE="-isystem $(pkg-config --variable=includedir libevdev)/libevdev-1.0 $NIX_CFLAGS_COMPILE"
echo "happy hacking!"
2023-09-02 22:25:09 +02:00
'';
2023-08-27 20:32:47 +02:00
};
};
}