aboutsummaryrefslogtreecommitdiffhomepage
path: root/flake.nix
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-15 16:27:34 +0900
committerOphestra <cat@gensokyo.uk>2025-11-15 16:36:36 +0900
commitc761e1de4dcf87b9106e4f70cb89217a81aa2f9f (patch)
tree90f01a31db350353a98d563f4b898eba4f919b90 /flake.nix
parenta91920310d20e1fc472dea044fce8fd9438835df (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix8
1 files changed, 6 insertions, 2 deletions
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
'';
}
);