From ce19887f77e7ab7e735882eb6c5163ccf6d30145 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 12 Oct 2023 15:17:26 +0000 Subject: [PATCH 1/2] treewide: update 'nix-direnv' bootstrapping --- .envrc | 4 ++-- templates/c++-cmake/.envrc | 4 ++-- templates/c++-meson/.envrc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.envrc b/.envrc index 956a218..9222bda 100644 --- a/.envrc +++ b/.envrc @@ -1,5 +1,5 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +if ! has nix_direnv_version || ! nix_direnv_version 2.4.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.4.0/direnvrc" "sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U=" fi nix_direnv_watch_file ./flake/checks.nix diff --git a/templates/c++-cmake/.envrc b/templates/c++-cmake/.envrc index f347aa9..ccf325e 100644 --- a/templates/c++-cmake/.envrc +++ b/templates/c++-cmake/.envrc @@ -1,5 +1,5 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +if ! has nix_direnv_version || ! nix_direnv_version 2.4.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.4.0/direnvrc" "sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U=" fi use flake diff --git a/templates/c++-meson/.envrc b/templates/c++-meson/.envrc index f347aa9..ccf325e 100644 --- a/templates/c++-meson/.envrc +++ b/templates/c++-meson/.envrc @@ -1,5 +1,5 @@ -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +if ! has nix_direnv_version || ! nix_direnv_version 2.4.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.4.0/direnvrc" "sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U=" fi use flake From 032bc89779f299f6dd77b111ce4bb531ece60b3f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 12 Oct 2023 15:19:44 +0000 Subject: [PATCH 2/2] pkgs: comma: rename 'COMMA_{,NIX}PKGS_FLAKE' This aligns with the rust implementation of this tool [1]. [1]: https://github.com/nix-community/comma/commit/17a4f3384954a43cec0f91361f153cda908fe3d3 --- home/comma/default.nix | 2 +- pkgs/comma/comma | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/home/comma/default.nix b/home/comma/default.nix index cc6a0ad..c6fe24a 100644 --- a/home/comma/default.nix +++ b/home/comma/default.nix @@ -23,7 +23,7 @@ in ]; home.sessionVariables = { - COMMA_PKGS_FLAKE = cfg.pkgsFlake; + COMMA_NIXPKGS_FLAKE = cfg.pkgsFlake; }; }; } diff --git a/pkgs/comma/comma b/pkgs/comma/comma index ba5c6ae..4367a26 100755 --- a/pkgs/comma/comma +++ b/pkgs/comma/comma @@ -30,4 +30,4 @@ if [ -z "$PROGRAM" ]; then exit 1 fi -nix shell "${COMMA_PKGS_FLAKE:-nixpkgs}#$PROGRAM" -c "$@" +nix shell "${COMMA_NIXPKGS_FLAKE:-nixpkgs}#$PROGRAM" -c "$@"