feat: refactor devshell as modular standalone path lol

This commit is contained in:
Rasyidan Akbar F. 2025-10-09 11:54:05 +07:00
commit 9e6791569e
9 changed files with 284 additions and 79 deletions

13
devshells/zig-nightly.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, lib, zigPackage, ... }:
lib.optionalAttrs (zigPackage != null) (pkgs.mkShell {
name = "zig-nightly";
packages = [ zigPackage pkgs.zls pkgs.pkg-config pkgs.cmake pkgs.gdb ];
shellHook = ''
mkdir -p "$PWD/.cache/zig"
export ZIG_GLOBAL_CACHE_DIR="$PWD/.cache/zig"
echo "Zig shell using ${zigPackage.pname or "zig"} ${
zigPackage.version or ""
}"
'';
})