From 79a35cf42eeeaac25b897515c2763d7525e02f46 Mon Sep 17 00:00:00 2001 From: Asmir A Date: Sat, 25 Jan 2025 11:54:19 +0100 Subject: [PATCH] flake: format and update zig --- flake.nix | 66 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/flake.nix b/flake.nix index 71a2102..9bd4b49 100644 --- a/flake.nix +++ b/flake.nix @@ -1,34 +1,44 @@ { 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" - ''; - }; + 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 - ]; + devShells.x86_64-linux.default = + with import nixpkgs { system = "x86_64-linux"; }; + mkShell { + nativeBuildInputs = [ + zig + lldb + ]; + buildInputs = [ + libevdev + pkg-config + ]; - shellHook = '' - NIX_CFLAGS_COMPILE="-isystem $(pkg-config --variable=includedir libevdev)/libevdev-1.0 $NIX_CFLAGS_COMPILE" - echo "happy hacking!" - ''; - }; - }; + shellHook = '' + NIX_CFLAGS_COMPILE="-isystem $(pkg-config --variable=includedir libevdev)/libevdev-1.0 $NIX_CFLAGS_COMPILE" + echo "happy hacking!" + ''; + }; + }; }