chore: fix flake.nix for zig 0.16

This commit is contained in:
Nurul Huda (Apon) 2026-05-31 16:25:47 +06:00
parent 50b1f197f3
commit 08cc6338d8
No known key found for this signature in database
GPG Key ID: 5D3F1DE2855A2F79

View File

@ -13,7 +13,6 @@
with nixpkgs.lib;
let
forAllSystems = f: genAttrs systems.flakeExposed (s: f nixpkgs.legacyPackages.${s});
src = cleanSource ./.;
in {
apps = forAllSystems (pkgs: {
default = {
@ -25,8 +24,11 @@
text = ''
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
(cd "${src}" && ZIG_LOCAL_CACHE_DIR="$tmp" zig build -p "$tmp" -Doptimize=Debug -Dexclude-lsp=true)
"$tmp/bin/zx" "$@"
export ZIG_LOCAL_CACHE_DIR="$tmp/cache"
export ZIG_GLOBAL_CACHE_DIR="$tmp/cache"
mkdir -p "$ZIG_LOCAL_CACHE_DIR"
zig build -p "$tmp/out" -Doptimize=Debug -Dexclude-lsp=true
"$tmp/out/bin/zx" "$@"
'';
}) + "/bin/zx";
};