From 3c7371cf458f79302fb6782ab7907943e2982f3d Mon Sep 17 00:00:00 2001 From: vabatta <2137077+vabatta@users.noreply.github.com> Date: Sun, 5 Apr 2026 00:21:30 +0200 Subject: [PATCH] chore: add direnv support and clean up nix dev shell --- .envrc | 1 + .gitignore | 1 + flake.nix | 16 ++++++++-------- 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..8392d15 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3a30961..b6428a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ pgsql.tmLanguage result +.direnv/ diff --git a/flake.nix b/flake.nix index 86bd5fb..80bc741 100644 --- a/flake.nix +++ b/flake.nix @@ -6,8 +6,14 @@ flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: + outputs = + { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem ( + system: let pkgs = nixpkgs.legacyPackages.${system}; nodejs = pkgs.nodejs; @@ -28,16 +34,10 @@ buildInputs = [ nodejs ]; shellHook = '' - export SHELL=${pkgs.zsh}/bin/zsh - echo "pgsql-grammar dev shell" echo " npm test — run grammar tests" echo " npm run validate — smoke test grammar against samples" echo " npm run preview — local Shiki preview at http://localhost:3117" - - if [[ $- == *i* ]]; then - exec $SHELL - fi ''; }; }