From c761e1de4dcf87b9106e4f70cb89217a81aa2f9f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 15 Nov 2025 16:27:34 +0900 Subject: nix: build with clang Clang is better than gcc in various ways. This also pulls in clang-format which is very helpful. Signed-off-by: Ophestra --- flake.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index e158b502..109551b7 100644 --- a/flake.nix +++ b/flake.nix @@ -114,7 +114,7 @@ inherit (pkgs) # passthru.buildInputs go - gcc + clang # nativeBuildInputs pkg-config @@ -129,6 +129,10 @@ zstd gnutar coreutils + + # for check + util-linux + nettools ; }; hsu = pkgs.callPackage ./cmd/hsu/package.nix { inherit (self.packages.${system}) hakurei; }; @@ -144,7 +148,7 @@ && chmod -R +w . export HAKUREI_VERSION="v${hakurei.version}" - ./dist/release.sh && mkdir $out && cp -v "dist/hakurei-$HAKUREI_VERSION.tar.gz"* $out + CC="clang -O3 -Werror" ./dist/release.sh && mkdir $out && cp -v "dist/hakurei-$HAKUREI_VERSION.tar.gz"* $out ''; } ); -- cgit v1.3.1