Compare commits

...

2 Commits

Author SHA1 Message Date
4962f12867
flake: update 2025-01-25 11:54:55 +01:00
79a35cf42e
flake: format and update zig 2025-01-25 11:54:19 +01:00
2 changed files with 42 additions and 32 deletions

8
flake.lock generated
View File

@ -2,10 +2,10 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718318537, "lastModified": 1737299813,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "narHash": "sha256-Qw2PwmkXDK8sPQ5YQ/y/icbQ+TYgbxfjhgnkNJyT1X8=",
"path": "/nix/store/qqwr649pc0qprc9lw2fmdsi1km6p7q2h-source", "path": "/nix/store/sbnwhhx7zjp45n53bkmnj4whg79aw8pq-source",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "rev": "107d5ef05c0b1119749e381451389eded30fb0d5",
"type": "path" "type": "path"
}, },
"original": { "original": {

View File

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