From 1f9633ee14fd448c62ebf3415cbae1b5110cfa36 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:53:36 +0000 Subject: [PATCH 1/8] Initial plan From 4ac24eda8dfbe7aff5e15acedffb8a54db05b759 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:00:11 +0000 Subject: [PATCH 2/8] Update Nix version requirement from 2.13 to 2.18 in flake.nix Co-authored-by: blaggacao <7548295+blaggacao@users.noreply.github.com> --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 2b1ea2be..cd96402f 100644 --- a/flake.nix +++ b/flake.nix @@ -70,7 +70,7 @@ inherit (fwlib') blockTypes actions dataWith flakeModule grow growOn findTargets; }; in - assert inputs.nixpkgs.lib.assertMsg ((builtins.compareVersions builtins.nixVersion "2.13") >= 0) "The truth is: you'll need a newer nix version to use Standard (minimum: v2.13)."; + assert inputs.nixpkgs.lib.assertMsg ((builtins.compareVersions builtins.nixVersion "2.18") >= 0) "The truth is: you'll need a newer nix version to use Standard (minimum: v2.18)."; (import ./dogfood.nix (inputs // { std = std // {inherit (inputs.self) narHash;}; From 52cf1414e78b33a106857939a32af34cf75a8dea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:17:46 +0000 Subject: [PATCH 3/8] Update GitHub Actions workflows to use DeterminateSystems/nix-installer-action@main for Nix 2.18+ compatibility Co-authored-by: blaggacao <7548295+blaggacao@users.noreply.github.com> --- .github/workflows/gh-pages.yaml | 2 +- .github/workflows/std.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index 4bbfd20b..a58f17d3 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: nixbuild/nix-quick-install-action@v25 + - uses: DeterminateSystems/nix-installer-action@main - name: Update subflake references run: ./.github/workflows/update-subflake.sh diff --git a/.github/workflows/std.yml b/.github/workflows/std.yml index 60edfdd7..7f70f054 100644 --- a/.github/workflows/std.yml +++ b/.github/workflows/std.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ inputs.runs-on }} steps: - uses: actions/checkout@v3 - - uses: nixbuild/nix-quick-install-action@v25 + - uses: DeterminateSystems/nix-installer-action@main - name: Update subflake references run: ./.github/workflows/update-subflake.sh # - uses: DeterminateSystems/magic-nix-cache-action@main @@ -40,7 +40,7 @@ jobs: name: ${{ matrix.target.jobName }} runs-on: ${{ inputs.runs-on }} steps: - - uses: nixbuild/nix-quick-install-action@v25 + - uses: DeterminateSystems/nix-installer-action@main # - uses: DeterminateSystems/magic-nix-cache-action@main - uses: divnix/std-action/run@main @@ -53,7 +53,7 @@ jobs: name: ${{ matrix.target.jobName }} runs-on: ${{ inputs.runs-on }} steps: - - uses: nixbuild/nix-quick-install-action@v25 + - uses: DeterminateSystems/nix-installer-action@main # - uses: DeterminateSystems/magic-nix-cache-action@main - uses: divnix/std-action/run@main @@ -66,7 +66,7 @@ jobs: name: ${{ matrix.target.jobName }} runs-on: ${{ inputs.runs-on }} steps: - - uses: nixbuild/nix-quick-install-action@v25 + - uses: DeterminateSystems/nix-installer-action@main - uses: actions/checkout@v3 - name: Update subflake references run: ./.github/workflows/update-subflake.sh From 3fc7f829d18f63c05690d9f13d9f3aaddf5493b0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:44:40 +0000 Subject: [PATCH 4/8] Update GitHub Actions workflows to use nixbuild/nix-quick-install-action@v32 Co-authored-by: blaggacao <7548295+blaggacao@users.noreply.github.com> --- .github/workflows/flakehub-publish-tagged.yml | 2 +- .github/workflows/gh-pages.yaml | 2 +- .github/workflows/std.yml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/flakehub-publish-tagged.yml b/.github/workflows/flakehub-publish-tagged.yml index b2dd4759..b7a171a6 100644 --- a/.github/workflows/flakehub-publish-tagged.yml +++ b/.github/workflows/flakehub-publish-tagged.yml @@ -19,7 +19,7 @@ jobs: - uses: "actions/checkout@v3" with: ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}" - - uses: "DeterminateSystems/nix-installer-action@main" + - uses: "nixbuild/nix-quick-install-action@v32" - uses: "DeterminateSystems/flakehub-push@main" with: visibility: "public" diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index a58f17d3..3c8e7037 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v32 - name: Update subflake references run: ./.github/workflows/update-subflake.sh diff --git a/.github/workflows/std.yml b/.github/workflows/std.yml index 7f70f054..484b6a3f 100644 --- a/.github/workflows/std.yml +++ b/.github/workflows/std.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ inputs.runs-on }} steps: - uses: actions/checkout@v3 - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v32 - name: Update subflake references run: ./.github/workflows/update-subflake.sh # - uses: DeterminateSystems/magic-nix-cache-action@main @@ -40,7 +40,7 @@ jobs: name: ${{ matrix.target.jobName }} runs-on: ${{ inputs.runs-on }} steps: - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v32 # - uses: DeterminateSystems/magic-nix-cache-action@main - uses: divnix/std-action/run@main @@ -53,7 +53,7 @@ jobs: name: ${{ matrix.target.jobName }} runs-on: ${{ inputs.runs-on }} steps: - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v32 # - uses: DeterminateSystems/magic-nix-cache-action@main - uses: divnix/std-action/run@main @@ -66,7 +66,7 @@ jobs: name: ${{ matrix.target.jobName }} runs-on: ${{ inputs.runs-on }} steps: - - uses: DeterminateSystems/nix-installer-action@main + - uses: nixbuild/nix-quick-install-action@v32 - uses: actions/checkout@v3 - name: Update subflake references run: ./.github/workflows/update-subflake.sh From f28616b4429d67e85fd1e4ac8f69b8f6faf873b8 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 25 Aug 2025 17:12:18 +0200 Subject: [PATCH 5/8] refactor: change subflake locking to an absolute git locking strategy for compatibility with nix 2.18+ --- .envrc | 9 +++------ .github/workflows/update-subflake.sh | 12 +++--------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.envrc b/.envrc index 8b94830d..6a3d32a9 100644 --- a/.envrc +++ b/.envrc @@ -1,11 +1,8 @@ #!/bin/sh -# first time -if [[ ! -d $(nix store add-path --name source --dry-run .) ]]; then - nix store add-path --name source . - (cd ./src/local && nix flake lock --update-input std) - (cd ./src/tests && nix flake lock --update-input std) -fi +# This locks subflakes to the latest commit of std +(cd ./src/local && nix flake lock --override-input std git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)) +(cd ./src/tests && nix flake lock --override-input std git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)) # shellcheck disable=SC1090 . "$(fetchurl "https://raw.githubusercontent.com/paisano-nix/direnv/main/lib" "sha256-IgQhKK7UHL1AfCUntJO2KCaIDJQotRnK2qC4Daxk+wI=")" diff --git a/.github/workflows/update-subflake.sh b/.github/workflows/update-subflake.sh index 38b6e4aa..d8f2dce6 100755 --- a/.github/workflows/update-subflake.sh +++ b/.github/workflows/update-subflake.sh @@ -1,12 +1,6 @@ # create the store path of nix store add-path --name source . -# update the subflake lockfile to the (now existing) store path -# set lastModified to 1 because unknown issues in the GH action environment -(cd ./src/local && nix flake lock --update-input std && ( - jq '.nodes.std.locked.lastModified = 1' flake.lock > flake.lock.new && rm flake.lock && mv flake.lock.new flake.lock -) && git add -f flake.lock) -(cd ./src/tests && nix flake lock --update-input std && ( - jq '.nodes.std.locked.lastModified = 1' flake.lock > flake.lock.new && rm flake.lock && mv flake.lock.new flake.lock -) &&git add -f flake.lock) -# continue normally ... +# This locks subflakes to the latest commit of std +(cd ./src/local && nix flake lock --override-input std git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)) +(cd ./src/tests && nix flake lock --override-input std git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)) From 4867218beb3587a9f2a3eb0046184e4fb0c3df77 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 25 Aug 2025 17:32:07 +0200 Subject: [PATCH 6/8] feat: update CI to use a new nix version --- .github/workflows/flakehub-publish-tagged.yml | 2 +- flake.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flakehub-publish-tagged.yml b/.github/workflows/flakehub-publish-tagged.yml index b7a171a6..b2dd4759 100644 --- a/.github/workflows/flakehub-publish-tagged.yml +++ b/.github/workflows/flakehub-publish-tagged.yml @@ -19,7 +19,7 @@ jobs: - uses: "actions/checkout@v3" with: ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}" - - uses: "nixbuild/nix-quick-install-action@v32" + - uses: "DeterminateSystems/nix-installer-action@main" - uses: "DeterminateSystems/flakehub-push@main" with: visibility: "public" diff --git a/flake.nix b/flake.nix index cd96402f..c10129a6 100644 --- a/flake.nix +++ b/flake.nix @@ -70,7 +70,7 @@ inherit (fwlib') blockTypes actions dataWith flakeModule grow growOn findTargets; }; in - assert inputs.nixpkgs.lib.assertMsg ((builtins.compareVersions builtins.nixVersion "2.18") >= 0) "The truth is: you'll need a newer nix version to use Standard (minimum: v2.18)."; + assert inputs.nixpkgs.lib.assertMsg ((builtins.compareVersions builtins.nixVersion "2.23") >= 0) "The truth is: you'll need a newer nix version to use Standard (minimum: v2.23)."; (import ./dogfood.nix (inputs // { std = std // {inherit (inputs.self) narHash;}; From f1a6bc4972162ca1ea21f7d281896bce619626e1 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 25 Aug 2025 17:41:29 +0200 Subject: [PATCH 7/8] fix: use a shallow clone in CI --- .github/workflows/update-subflake.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-subflake.sh b/.github/workflows/update-subflake.sh index d8f2dce6..adb8a0a0 100755 --- a/.github/workflows/update-subflake.sh +++ b/.github/workflows/update-subflake.sh @@ -2,5 +2,5 @@ nix store add-path --name source . # This locks subflakes to the latest commit of std -(cd ./src/local && nix flake lock --override-input std git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)) -(cd ./src/tests && nix flake lock --override-input std git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)) +(cd ./src/local && nix flake lock --override-input std git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)&shallow=1) +(cd ./src/tests && nix flake lock --override-input std git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)&shallow=1) From 1b070da102b6e5fd1745c397b3f810409a106dde Mon Sep 17 00:00:00 2001 From: David Date: Mon, 25 Aug 2025 18:03:11 +0200 Subject: [PATCH 8/8] fix: allow shallow clone of this repo --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index c10129a6..07fcb8dd 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ # SPDX-License-Identifier: Unlicense { description = "The Nix Flakes framework for perfectionists with deadlines"; + inputs.self.shallow = true; # override downstream with inputs.std.inputs.nixpkgs.follows = ... inputs.nixpkgs.url = "github:nixos/nixpkgs/release-23.11"; inputs.lib.url = "github:nix-community/nixpkgs.lib";