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