diff --git a/.envrc b/.envrc index 8b94830d..ef0e0761 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/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..db94bded --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1 @@ +663321ed4f88c1af3127195c6b9a2130c22a11ab diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e0c36ef..09126405 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: mac: uses: ./.github/workflows/std.yml with: - runs-on: macOS-13 + runs-on: macOS-latest secrets: inherit linux: diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index 4bbfd20b..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: nixbuild/nix-quick-install-action@v25 + - 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 60edfdd7..1541bd1f 100644 --- a/.github/workflows/std.yml +++ b/.github/workflows/std.yml @@ -23,8 +23,8 @@ jobs: runs-on: ${{ inputs.runs-on }} steps: - - uses: actions/checkout@v3 - - uses: nixbuild/nix-quick-install-action@v25 + - uses: actions/checkout@v6 + - 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: nixbuild/nix-quick-install-action@v25 + - 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: nixbuild/nix-quick-install-action@v25 + - 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: nixbuild/nix-quick-install-action@v25 + - uses: nixbuild/nix-quick-install-action@v32 - uses: actions/checkout@v3 - name: Update subflake references run: ./.github/workflows/update-subflake.sh diff --git a/.github/workflows/update-subflake.sh b/.github/workflows/update-subflake.sh index 38b6e4aa..575ba03d 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)&shallow=1") +(cd ./src/tests && nix flake lock --override-input std "git+file://$(pwd)/../..?rev=$(git -C ../.. rev-parse HEAD)&shallow=1") diff --git a/MERGED_PR b/MERGED_PR new file mode 100644 index 00000000..fbb0e1a9 --- /dev/null +++ b/MERGED_PR @@ -0,0 +1,5 @@ +A list of the PRs that I merged from divnix/std in this repo + +- [refactor: change subflake locking to an absolute git locking strategy for compatibility with nix 2.18](https://github.com/divnix/std/pull/418) +- [Fix prettier](https://github.com/divnix/std/pull/419) +- [Pass down $@ to the copy function in the container's publish command](https://github.com/divnix/std/pull/421) diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..d0141dc9 --- /dev/null +++ b/Makefile @@ -0,0 +1,71 @@ +root = $(shell git rev-parse --show-toplevel) +SYSTEM := $(shell nix eval --impure --raw --expr 'builtins.currentSystem') +LINUX := x86_64-linux +DARWIN := aarch64-darwin + +.PHONY: fmt +fmt: + treefmt + +update-sub-flake: + cd $(root) + cd src/local && nix flake update + cd src/tests && nix flake update + +ci-local: ci-checks ci-cli ci-shells ci-format + @echo "=== All CI checks passed ===" + +ci-all: ci-checks-all ci-cli-all ci-shells-all ci-format + @echo "=== All CI checks passed (all systems) ===" + +# Not in ci-local by default: dirties flake.lock files, requires committed HEAD. +# Add to ci-local prereqs if full CI parity needed. +ci-sync: + @echo "=== Syncing subflake locks ===" + ./.github/workflows/update-subflake.sh + +ci-checks: + @echo "=== Running checks ===" + nix build .#checks.$(SYSTEM) --no-link + +ci-checks-all: ci-checks-linux ci-checks-darwin +ci-checks-linux: + @echo "=== Running checks (linux) ===" + nix build .#checks.$(LINUX) --no-link +ci-checks-darwin: + @echo "=== Running checks (darwin) ===" + nix build .#checks.$(DARWIN) --no-link + +ci-cli: + @echo "=== Building CLI ===" + nix build .#packages.$(SYSTEM).default + +ci-cli-all: ci-cli-linux ci-cli-darwin +ci-cli-linux: + @echo "=== Building CLI (linux) ===" + nix build .#packages.$(LINUX).default +ci-cli-darwin: + @echo "=== Building CLI (darwin) ===" + nix build .#packages.$(DARWIN).default + +ci-shells: + @echo "=== Building devshells ===" + nix build .#devShells.$(SYSTEM).default --no-link + +ci-shells-all: ci-shells-linux ci-shells-darwin +ci-shells-linux: + @echo "=== Building devshells (linux) ===" + nix build .#devShells.$(LINUX).default --no-link +ci-shells-darwin: + @echo "=== Building devshells (darwin) ===" + nix build .#devShells.$(DARWIN).default --no-link + +ci-format: + @echo "=== Checking formatting ===" + treefmt --fail-on-change + +.PHONY: update-sub-flake ci-local ci-all ci-sync +.PHONY: ci-checks ci-checks-all ci-checks-linux ci-checks-darwin +.PHONY: ci-cli ci-cli-all ci-cli-linux ci-cli-darwin +.PHONY: ci-shells ci-shells-all ci-shells-linux ci-shells-darwin +.PHONY: ci-format diff --git a/flake.lock b/flake.lock index 38b25174..6dd9b2fc 100644 --- a/flake.lock +++ b/flake.lock @@ -100,11 +100,11 @@ }, "lib": { "locked": { - "lastModified": 1722128034, - "narHash": "sha256-L8rwzYPsLo/TYtydPJoQyYOfetuiyQYnTWYcyB8UE/s=", + "lastModified": 1771723719, + "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "d15f6f6021693898fcd2c6a9bb13707383da9bbc", + "rev": "36b8fcb216736b0e1869740b324ae521e5df23d8", "type": "github" }, "original": { @@ -115,16 +115,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720535198, - "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=", + "lastModified": 1772126089, + "narHash": "sha256-btWE4hUI+cQvBG3b8H5pan+v1fYEm88LmogbRZjXOdw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", + "rev": "3b7080affa3142f035891aabab1e568fd444c7e5", "type": "github" }, "original": { "owner": "nixos", - "ref": "release-23.11", + "ref": "release-25.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 2b1ea2be..129e4659 100644 --- a/flake.nix +++ b/flake.nix @@ -4,8 +4,20 @@ # SPDX-License-Identifier: Unlicense { description = "The Nix Flakes framework for perfectionists with deadlines"; + # 2026-02-26 @mayeu: I don't understand what it is, and why it's there + # but it doesn't work for me: + # + # ➜ nix --version + # ➜ direnv allow + # error: flake 'self' attribute 'shallow' is not supported + # direnv: The follwing command just failed: + # direnv: nix build --no-update-lock-file --no-write-lock-file --no-warn-dirty --accept-flake-config --no-link --keep-outputs --build-poll-interval 0 --builders-use-substitutes --print-out-paths --profile /Users/m/code-des-autres/std/.data/local/shells/default/enter-action git+file:///Users/m/code-des-autres/std#__std.actions.aarch64-darwin.local.shells.default.enter + # Rerun with --show-trace (y/N): y + # error: flake 'self' attribute 'shallow' is not supported. + # + #inputs.self.shallow = true; # override downstream with inputs.std.inputs.nixpkgs.follows = ... - inputs.nixpkgs.url = "github:nixos/nixpkgs/release-23.11"; + inputs.nixpkgs.url = "github:nixos/nixpkgs/release-25.11"; inputs.lib.url = "github:nix-community/nixpkgs.lib"; inputs = { paisano.url = "github:paisano-nix/core/0.2.0"; @@ -70,7 +82,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.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;}; diff --git a/src/data/configs/lefthook.nix b/src/data/configs/lefthook.nix index 1fc1bc05..8ab52958 100644 --- a/src/data/configs/lefthook.nix +++ b/src/data/configs/lefthook.nix @@ -19,6 +19,7 @@ in { treefmt = { run = "${lib.getExe nixpkgs.treefmt} --fail-on-change {staged_files}"; skip = ["merge" "rebase"]; + interactive = true; }; }; }; diff --git a/src/data/configs/mdbook.nix b/src/data/configs/mdbook.nix index 78e3e0f9..6ff422ac 100644 --- a/src/data/configs/mdbook.nix +++ b/src/data/configs/mdbook.nix @@ -6,7 +6,6 @@ in { packages = [ nixpkgs.alejandra nixpkgs.nodePackages.prettier - nixpkgs.nodePackages.prettier-plugin-toml nixpkgs.shfmt mdbook-paisano-preprocessor ]; diff --git a/src/data/configs/treefmt.nix b/src/data/configs/treefmt.nix index 53fcd5a2..4e77c507 100644 --- a/src/data/configs/treefmt.nix +++ b/src/data/configs/treefmt.nix @@ -5,7 +5,6 @@ in { packages = [ nixpkgs.alejandra nixpkgs.nodePackages.prettier - nixpkgs.nodePackages.prettier-plugin-toml nixpkgs.shfmt ]; @@ -17,7 +16,6 @@ in { }; prettier = { command = lib.getExe nixpkgs.nodePackages.prettier; - options = ["--plugin" "${nixpkgs.nodePackages.prettier-plugin-toml}/lib/node_modules/prettier-plugin-toml/lib/index.js" "--write"]; includes = [ "*.css" "*.html" diff --git a/src/lib/cfg/lefthook.md b/src/lib/cfg/lefthook.md index 803582a0..626b42ff 100644 --- a/src/lib/cfg/lefthook.md +++ b/src/lib/cfg/lefthook.md @@ -11,3 +11,62 @@ ```nix {{#include ../../src/lib/cfg/lefthook.nix}} ``` + +#### Explanation of the `in { ... }` block + +This `in { ... }` block is a **Nixago configuration record**, it tells the +Nixago block type how to generate and manage the `lefthook.yml` file. + +`data = {};` is The actual lefthook config content. It's empty here because this +is just the template/scaffold, the real config data gets merged in by consumers +(e.g. in `src/local/configs.nix` or wherever this is used). Nixago deep-merges +`data` from the caller. + +`hook.extra` is a Nixago hook hat runs whenever the generated `lefthook.yml` is +materialized. It receives the final merged `config` (the full lefthook YAML +content as a Nix attrset) and produces extra shell commands. Here's the pipeline +step by step: + +```nix +hook.extra = config: + let + commands = lib.pipe config [ + # 1. Strip non-stage keys (colors, extends, etc.) + # e.g. { pre-commit = {...}; commit-msg = {...}; colors = true; } + # becomes { pre-commit = {...}; commit-msg = {...}; } + toStagesConfig + + # 2. Extract just the attribute names → ["pre-commit" "commit-msg"] + lib.attrNames + + # 3. For each stage, create a symlink command: + # ln -sf "/nix/store/...-lefthook-pre-commit" ".git/hooks/pre-commit" + # The target is a Nix-built script (mkScript) that runs: + # lefthook run "pre-commit" "$@" + # (unless $LEFTHOOK == "0", which disables it) + (lib.map (stage: ''ln -sf "${mkScript stage}" ".git/hooks/${stage}"'')) + + # 4. Prepend "mkdir -p .git/hooks" IF there are any stages + # ["mkdir -p .git/hooks" "ln -sf ..." "ln -sf ..."] + (stages: + lib.optional (stages != []) "mkdir -p .git/hooks" + ++ stages) + + # 5. Join into a single newline-separated shell script string + (lib.concatStringsSep "\n") + ]; + in '' + # Only install hooks in the main repo, not in worktrees. + # In worktrees, .git is a file pointing to the main repo's .git dir, + # so mkdir -p .git/hooks would fail. + if test "$(git rev-parse --git-dir)" = "$(git rev-parse --git-common-dir)"; then + ${commands} + fi + ''; +``` + +When you run the Nixago hook (e.g. via `direnv allow` or `std` commands), it: + +1. Writes `lefthook.yml` to your project root +2. Runs this `hook.extra` script, which symlinks Nix-built wrapper scripts into + `.git/hooks/` (only in the main repo, not in worktrees) diff --git a/src/lib/cfg/lefthook.nix b/src/lib/cfg/lefthook.nix index c34180fd..6b8e9cd8 100644 --- a/src/lib/cfg/lefthook.nix +++ b/src/lib/cfg/lefthook.nix @@ -21,9 +21,10 @@ in { format = "yaml"; output = "lefthook.yml"; packages = [nixpkgs.lefthook]; - # Add an extra hook for adding required stages whenever the file changes - hook.extra = config: - lib.pipe config [ + # Add an extra hook for adding required stages whenever the file changes. + # Skip hook installation in git worktrees where .git is a file, not a directory. + hook.extra = config: let + commands = lib.pipe config [ toStagesConfig lib.attrNames (lib.map (stage: ''ln -sf "${mkScript stage}" ".git/hooks/${stage}"'')) @@ -32,4 +33,9 @@ in { ++ stages) (lib.concatStringsSep "\n") ]; + in '' + if test "$(${lib.getExe nixpkgs.git} rev-parse --git-dir 2>/dev/null)" = "$(${lib.getExe nixpkgs.git} rev-parse --git-common-dir 2>/dev/null)"; then + ${commands} + fi + ''; } diff --git a/src/local/configs.nix b/src/local/configs.nix index e075208c..c09dfbb2 100644 --- a/src/local/configs.nix +++ b/src/local/configs.nix @@ -18,7 +18,7 @@ in { global.excludes = ["src/std/templates/**"]; formatter = { go = { - command = "gofmt"; + command = "${nixpkgs.go}/bin/gofmt"; options = ["-w"]; includes = ["*.go"]; }; diff --git a/src/local/flake.lock b/src/local/flake.lock index 0bbffbb3..0e0fe0a4 100644 --- a/src/local/flake.lock +++ b/src/local/flake.lock @@ -35,15 +35,14 @@ "nixpkgs": [ "std", "nixpkgs" - ], - "systems": "systems" + ] }, "locked": { - "lastModified": 1687173957, - "narHash": "sha256-GOds2bAQcZ94fb9/Nl/aM+r+0wGSi4EKYuZYR8Dw4R8=", + "lastModified": 1768818222, + "narHash": "sha256-460jc0+CZfyaO8+w8JNtlClB2n4ui1RbHfPTLkpwhU8=", "owner": "numtide", "repo": "devshell", - "rev": "2cf83bb31720fcc29a999aee28d6da101173e66a", + "rev": "255a2b1725a20d060f566e4755dbf571bbbb5f76", "type": "github" }, "original": { @@ -97,21 +96,6 @@ "type": "github" } }, - "flake-utils_2": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "haumea": { "inputs": { "nixpkgs": [ @@ -157,11 +141,11 @@ }, "lib": { "locked": { - "lastModified": 1722128034, - "narHash": "sha256-L8rwzYPsLo/TYtydPJoQyYOfetuiyQYnTWYcyB8UE/s=", + "lastModified": 1771723719, + "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "d15f6f6021693898fcd2c6a9bb13707383da9bbc", + "rev": "36b8fcb216736b0e1869740b324ae521e5df23d8", "type": "github" }, "original": { @@ -172,18 +156,17 @@ }, "n2c": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": [ "std", "nixpkgs" ] }, "locked": { - "lastModified": 1685771919, - "narHash": "sha256-3lVKWrhNXjHJB6QkZ2SJaOs4X/mmYXtY6ovPVpDMOHc=", + "lastModified": 1767430085, + "narHash": "sha256-SiXJ6xv4pS2MDUqfj0/mmG746cGeJrMQGmoFgHLS25Y=", "owner": "nlewo", "repo": "nix2container", - "rev": "95e2220911874064b5d809f8d35f7835184c4ddf", + "rev": "66f4b8a47e92aa744ec43acbb5e9185078983909", "type": "github" }, "original": { @@ -204,23 +187,23 @@ ] }, "locked": { - "lastModified": 1685739139, - "narHash": "sha256-CLGEW11Fo1v4vj0XSqiyW1EbhRZFO7dkgM43eKwItrk=", + "lastModified": 1731804449, + "narHash": "sha256-1ka+5B90UAt7D5kkT9dOExGLJjtLM8dqLeBdFRoeuWg=", "owner": "nix-community", "repo": "namaka", - "rev": "d9a2cc83c1d0f68bd613f1fc909d0ef2cfffcf2e", + "rev": "6a8f92b7963e772adee605f7e1a683ad92df0190", "type": "github" }, "original": { "owner": "nix-community", - "ref": "v0.2.0", + "ref": "v0.2.1", "repo": "namaka", "type": "github" } }, "nixago": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixago-exts": [], "nixpkgs": [ "std", @@ -228,11 +211,11 @@ ] }, "locked": { - "lastModified": 1687381756, - "narHash": "sha256-IUMIlYfrvj7Yli4H2vvyig8HEPpfCeMaE6+kBGPzFyk=", + "lastModified": 1746801636, + "narHash": "sha256-dlcKfIXp/eqFHzFm+DzseXAWWlpVwyk9cTvCKGtVKkw=", "owner": "nix-community", "repo": "nixago", - "rev": "dacceb10cace103b3e66552ec9719fa0d33c0dc9", + "rev": "8cc33f973ab3a891d8a41391e73ef451a783960b", "type": "github" }, "original": { @@ -243,16 +226,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720535198, - "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=", + "lastModified": 1772126089, + "narHash": "sha256-btWE4hUI+cQvBG3b8H5pan+v1fYEm88LmogbRZjXOdw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", + "rev": "3b7080affa3142f035891aabab1e568fd444c7e5", "type": "github" }, "original": { "owner": "nixos", - "ref": "release-23.11", + "ref": "release-25.11", "repo": "nixpkgs", "type": "github" } @@ -364,31 +347,19 @@ "yants": "yants" }, "locked": { - "lastModified": 0, - "narHash": "sha256-XnaA3tCS63IMY04wTMqJ5EX47X0fDM9J+0dg6TxXvz8=", - "path": "/nix/store/5pmjinxmq96n3k708s8qii01awbr9w09-source", - "type": "path" + "lastModified": 1772127938, + "narHash": "sha256-peYU8Fd5qYKMZpBMxKWFW6UHq+Qf8fLR2kpcQ8irBTw=", + "ref": "refs/heads/fix/upgrade-flake-lock", + "rev": "7c75c6d51d37fd4c7567ed0159497470d77e9c73", + "revCount": 836, + "type": "git", + "url": "file:///Users/m/code-des-autres/std/src/local/../.." }, "original": { - "path": "/nix/store/5pmjinxmq96n3k708s8qii01awbr9w09-source", + "path": "../../", "type": "path" } }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "yants": { "inputs": { "nixpkgs": [ diff --git a/src/local/flake.nix b/src/local/flake.nix index 6315a203..ead23fbd 100644 --- a/src/local/flake.nix +++ b/src/local/flake.nix @@ -1,7 +1,7 @@ { inputs = { # injected (private) inputs - namaka.url = "github:nix-community/namaka/v0.2.0"; + namaka.url = "github:nix-community/namaka/v0.2.1"; namaka.inputs.haumea.follows = "std/haumea"; namaka.inputs.nixpkgs.follows = "std/nixpkgs"; diff --git a/src/std/fwlib/blockTypes/_postDiffToGitHubSnippet.nix b/src/std/fwlib/blockTypes/_postDiffToGitHubSnippet.nix index 92f3906f..a5f3d223 100644 --- a/src/std/fwlib/blockTypes/_postDiffToGitHubSnippet.nix +++ b/src/std/fwlib/blockTypes/_postDiffToGitHubSnippet.nix @@ -1,70 +1,70 @@ _: marker: diff_output: summary: '' - if [[ -v CI ]] && [[ -v BRANCH ]] && [[ -v OWNER_AND_REPO ]] && command -v gh > /dev/null ; then + if [[ -v CI ]] && [[ -v BRANCH ]] && [[ -v OWNER_AND_REPO ]] && command -v gh > /dev/null ; then - OWNER_REPO_NAME=$(gh repo view "$OWNER_AND_REPO" --json nameWithOwner --jq '.nameWithOwner') + OWNER_REPO_NAME=$(gh repo view "$OWNER_AND_REPO" --json nameWithOwner --jq '.nameWithOwner') - if ! gh pr view "$BRANCH" --repo "$OWNER_REPO_NAME" >/dev/null 2>&1; then - exit 0 - fi - - # Proceed only if there is output - if [[ -z "${diff_output}" ]]; then - exit 0 - fi + if ! gh pr view "$BRANCH" --repo "$OWNER_REPO_NAME" >/dev/null 2>&1; then + exit 0 + fi - CENTRAL_COMMENT_HEADER="" - ENTRY_START_MARKER="" - ENTRY_END_MARKER="" + # Proceed only if there is output + if [[ -z "${diff_output}" ]]; then + exit 0 + fi - # Use the provided summary - DIFF_ENTRY=$(cat < -${summary} + # Use the provided summary + DIFF_ENTRY=$(cat < + ${summary} - -$ENTRY_END_MARKER -EOF - ) + \`\`\`diff + ${diff_output} + \`\`\` - PR_NUMBER=$(gh pr view "$BRANCH" --repo "$OWNER_REPO_NAME" --json number --jq '.number') + + $ENTRY_END_MARKER + EOF + ) - EXISTING_COMMENT_ID=$(gh api "repos/$OWNER_REPO_NAME/issues/$PR_NUMBER/comments?per_page=100" --jq ".[] | select(.body | contains(\"$CENTRAL_COMMENT_HEADER\")) | .id" | head -n 1) + PR_NUMBER=$(gh pr view "$BRANCH" --repo "$OWNER_REPO_NAME" --json number --jq '.number') - if [[ -n "$EXISTING_COMMENT_ID" ]]; then - EXISTING_BODY=$(gh api "repos/$OWNER_REPO_NAME/issues/comments/$EXISTING_COMMENT_ID" --jq '.body') + EXISTING_COMMENT_ID=$(gh api "repos/$OWNER_REPO_NAME/issues/$PR_NUMBER/comments?per_page=100" --jq ".[] | select(.body | contains(\"$CENTRAL_COMMENT_HEADER\")) | .id" | head -n 1) - if echo "$EXISTING_BODY" | grep -q "$ENTRY_START_MARKER"; then - UPDATED_BODY=$(echo "$EXISTING_BODY" | sed -e "\#$ENTRY_START_MARKER#,\#$ENTRY_END_MARKER#d") - else - UPDATED_BODY="$EXISTING_BODY" - fi + if [[ -n "$EXISTING_COMMENT_ID" ]]; then + EXISTING_BODY=$(gh api "repos/$OWNER_REPO_NAME/issues/comments/$EXISTING_COMMENT_ID" --jq '.body') - UPDATED_BODY="$UPDATED_BODY -$DIFF_ENTRY" + if echo "$EXISTING_BODY" | grep -q "$ENTRY_START_MARKER"; then + UPDATED_BODY=$(echo "$EXISTING_BODY" | sed -e "\#$ENTRY_START_MARKER#,\#$ENTRY_END_MARKER#d") + else + UPDATED_BODY="$EXISTING_BODY" + fi - echo "Updating existing comment..." - gh api --method PATCH "repos/$OWNER_REPO_NAME/issues/comments/$EXISTING_COMMENT_ID" -f body="$UPDATED_BODY" --jq '.html_url' + UPDATED_BODY="$UPDATED_BODY + $DIFF_ENTRY" - else - NEW_COMMENT=$(cat </dev/null; then exit 1 diff --git a/src/std/fwlib/blockTypes/containers.nix b/src/std/fwlib/blockTypes/containers.nix index 7bdcb043..49641be5 100644 --- a/src/std/fwlib/blockTypes/containers.nix +++ b/src/std/fwlib/blockTypes/containers.nix @@ -62,7 +62,7 @@ in '' {}) (mkCommand currentSystem "publish" "copy the image to its remote registry" [skopeo-nix2container] '' ${copyFn} - copy docker://${target.image.repo} + copy docker://${target.image.repo} "$@" '' { meta.image = target.image.name; inherit proviso; diff --git a/src/std/fwlib/blockTypes/devshells.nix b/src/std/fwlib/blockTypes/devshells.nix index 00c292ee..8f1e56f4 100644 --- a/src/std/fwlib/blockTypes/devshells.nix +++ b/src/std/fwlib/blockTypes/devshells.nix @@ -1,4 +1,4 @@ -{ +{ root, super, }: diff --git a/src/std/fwlib/blockTypes/terra.nix b/src/std/fwlib/blockTypes/terra.nix index c9116bf2..4d6fb896 100644 --- a/src/std/fwlib/blockTypes/terra.nix +++ b/src/std/fwlib/blockTypes/terra.nix @@ -47,10 +47,12 @@ in terraformConfiguration = builtins.toFile "config.tf.json" (builtins.toJSON (terraEval { inherit pkgs; # only effectively required for `pkgs.lib` - terranix_config = { - _file = fragmentRelPath; - imports = [target]; - }; + modules = [ + { + _file = fragmentRelPath; + imports = [target]; + } + ]; strip_nulls = true; }) .config); @@ -84,18 +86,17 @@ in --state ${git.state} \ terraform ${cmd} "$@" \ ${pkgs.lib.optionalString (cmd == "plan") '' - -lock=false -no-color | tee "$PRJ_CACHE_HOME/tf.console.txt" - ''} + -lock=false -no-color | tee "$PRJ_CACHE_HOME/tf.console.txt" + ''} # Pass output to the snippet ${pkgs.lib.optionalString (cmd == "plan") '' output=$(cat "$PRJ_CACHE_HOME/tf.console.txt") summary_plan=$(tac "$PRJ_CACHE_HOME/tf.console.txt" | grep -m 1 -E '^(Error:|Plan:|Apply complete!|No changes.|Success)' | tac || echo "View output.") - summary="std ${fragmentRelPath}:${cmd}: $summary_plan" + summary="std ${fragmentRelPath}:${cmd}: $summary_plan" ${postDiffToGitHubSnippet "${fragmentRelPath}:${cmd}" "$output" "$summary"} ''} ''; - in [ (mkCommand currentSystem "init" "tf init" [pkgs.jq pkgs.terraform pkgs.terraform-backend-git] (wrap "init") {}) (mkCommand currentSystem "plan" "tf plan" [pkgs.jq pkgs.terraform pkgs.terraform-backend-git] (wrap "plan") {}) diff --git a/src/std/fwlib/flakeModule.nix b/src/std/fwlib/flakeModule.nix index 2fc5d9bc..462a6bd7 100644 --- a/src/std/fwlib/flakeModule.nix +++ b/src/std/fwlib/flakeModule.nix @@ -168,12 +168,12 @@ in }; config = { flake = let - grown = grow ({ - inherit inputs; - inherit (config) systems; - # access them explicitly to trigger a module system error if not defined - inherit (cfg.grow) cellsFrom cellBlocks nixpkgsConfig; - }); + grown = grow { + inherit inputs; + inherit (config) systems; + # access them explicitly to trigger a module system error if not defined + inherit (cfg.grow) cellsFrom cellBlocks nixpkgsConfig; + }; picked = mapAttrs (_: v: pick grown v) cfg.pick; harvested = mapAttrs (_: v: harvest grown v) cfg.harvest; winnowed = zipAttrsWith (n: v: winnow (head v) grown (head (tail v))) [cfg.winnowIf cfg.winnow]; diff --git a/src/tests/checks.nix b/src/tests/checks.nix index cbd91d1e..84f6e7ca 100644 --- a/src/tests/checks.nix +++ b/src/tests/checks.nix @@ -1,16 +1,22 @@ let - inherit (inputs) namaka self; + inherit (inputs) namaka nixpkgs self; inputs' = builtins.removeAttrs inputs ["self"]; + namakaResults = namaka.lib.load { + src = self + /tests; + inputs = + inputs' + // + # inputs.self is too noisy for 'check-augmented-cell-inputs' + {inputs = inputs';}; + }; in { snapshots = { meta.description = "The main Standard Snapshotting test suite"; - check = namaka.lib.load { - src = self + /tests; - inputs = - inputs' - // - # inputs.self is too noisy for 'check-augmented-cell-inputs' - {inputs = inputs';}; - }; + # 2026-03-01 @mayeu: unsure if that's ok, but namaka.lib.load throws on + # failure, returns {} on success. Wrap in a derivation so nix build + # .#checks. works. + check = nixpkgs.runCommand "namaka-snapshots" {} '' + # ${builtins.toJSON namakaResults} + touch $out ''; }; } diff --git a/src/tests/flake.lock b/src/tests/flake.lock index f9f92882..6c48845a 100644 --- a/src/tests/flake.lock +++ b/src/tests/flake.lock @@ -10,11 +10,11 @@ ] }, "locked": { - "lastModified": 1682181677, - "narHash": "sha256-El8WQ2ccxWwkSrjuwKNR0gD/O7vS/KLBY4Q2/nF8m1c=", + "lastModified": 1770259557, + "narHash": "sha256-EvZ09k9+mzXAngPzU2K7oLLUDlKoT1numb4bDb3Gtl4=", "owner": "hercules-ci", "repo": "arion", - "rev": "6a1f03329c400327b3b2e0ed5e1efff11037ba67", + "rev": "9b24cf65c72cb0e9616e437d55e1ac8e5c6bc715", "type": "github" }, "original": { @@ -58,15 +58,14 @@ "nixpkgs": [ "std", "nixpkgs" - ], - "systems": "systems" + ] }, "locked": { - "lastModified": 1687173957, - "narHash": "sha256-GOds2bAQcZ94fb9/Nl/aM+r+0wGSi4EKYuZYR8Dw4R8=", + "lastModified": 1768818222, + "narHash": "sha256-460jc0+CZfyaO8+w8JNtlClB2n4ui1RbHfPTLkpwhU8=", "owner": "numtide", "repo": "devshell", - "rev": "2cf83bb31720fcc29a999aee28d6da101173e66a", + "rev": "255a2b1725a20d060f566e4755dbf571bbbb5f76", "type": "github" }, "original": { @@ -113,11 +112,11 @@ ] }, "locked": { - "lastModified": 1675933616, - "narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=", + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "47478a4a003e745402acf63be7f9a092d51b83d7", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", "type": "github" }, "original": { @@ -131,11 +130,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1685662779, - "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", "type": "github" }, "original": { @@ -144,40 +143,28 @@ "type": "github" } }, - "flake-utils": { + "flake-parts_3": { "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1685518550, - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", - "type": "github" + "nixpkgs-lib": [ + "terranix", + "nixpkgs" + ] }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "lastModified": 1736143030, + "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, - "flake-utils_3": { + "flake-utils": { "locked": { "lastModified": 1653893745, "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", @@ -192,21 +179,6 @@ "type": "github" } }, - "flake-utils_4": { - "locked": { - "lastModified": 1634851050, - "narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c91f3de5adaf1de973b797ef7485e441a65b8935", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "haskell-flake": { "locked": { "lastModified": 1675296942, @@ -268,11 +240,11 @@ }, "lib": { "locked": { - "lastModified": 1722128034, - "narHash": "sha256-L8rwzYPsLo/TYtydPJoQyYOfetuiyQYnTWYcyB8UE/s=", + "lastModified": 1771723719, + "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "d15f6f6021693898fcd2c6a9bb13707383da9bbc", + "rev": "36b8fcb216736b0e1869740b324ae521e5df23d8", "type": "github" }, "original": { @@ -289,11 +261,11 @@ ] }, "locked": { - "lastModified": 1687381438, - "narHash": "sha256-fdN+9as0dGFR+S5Ea6hqLtNhiy52kPaZuGlRGxlyQZY=", + "lastModified": 1753906051, + "narHash": "sha256-86UR4dRNR9WGnWV/r2MR8X+3NC5gwROlX6+yqxbbXjA=", "owner": "fluidattacks", "repo": "makes", - "rev": "78993b56802419ba5e56c22471a12349e66be47b", + "rev": "9123a55ab84b57fe08bb33379b92fe3922e71408", "type": "github" }, "original": { @@ -304,18 +276,18 @@ }, "microvm": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": [ "std", "nixpkgs" - ] + ], + "spectrum": "spectrum" }, "locked": { - "lastModified": 1687369979, - "narHash": "sha256-pSkc15k9yug3vwnri5quvi0R6LHR4u7J0/8FkTpFlmQ=", + "lastModified": 1772055583, + "narHash": "sha256-iPIm1orqkhsxqju6EVODOrV1BmyA5HNTZ8a1o812bFM=", "owner": "astro", "repo": "microvm.nix", - "rev": "c14833d8506a784f0b3cf91a2b864acb05662711", + "rev": "f6dcfb7c16cc3775536c825dc0698d4ede13d063", "type": "github" }, "original": { @@ -326,18 +298,17 @@ }, "n2c": { "inputs": { - "flake-utils": "flake-utils_2", "nixpkgs": [ "std", "nixpkgs" ] }, "locked": { - "lastModified": 1685771919, - "narHash": "sha256-3lVKWrhNXjHJB6QkZ2SJaOs4X/mmYXtY6ovPVpDMOHc=", + "lastModified": 1767430085, + "narHash": "sha256-SiXJ6xv4pS2MDUqfj0/mmG746cGeJrMQGmoFgHLS25Y=", "owner": "nlewo", "repo": "nix2container", - "rev": "95e2220911874064b5d809f8d35f7835184c4ddf", + "rev": "66f4b8a47e92aa744ec43acbb5e9185078983909", "type": "github" }, "original": { @@ -374,7 +345,7 @@ }, "nixago": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils", "nixago-exts": [], "nixpkgs": [ "std", @@ -382,11 +353,11 @@ ] }, "locked": { - "lastModified": 1687381756, - "narHash": "sha256-IUMIlYfrvj7Yli4H2vvyig8HEPpfCeMaE6+kBGPzFyk=", + "lastModified": 1746801636, + "narHash": "sha256-dlcKfIXp/eqFHzFm+DzseXAWWlpVwyk9cTvCKGtVKkw=", "owner": "nix-community", "repo": "nixago", - "rev": "dacceb10cace103b3e66552ec9719fa0d33c0dc9", + "rev": "8cc33f973ab3a891d8a41391e73ef451a783960b", "type": "github" }, "original": { @@ -397,35 +368,32 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720535198, - "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=", + "lastModified": 1772126089, + "narHash": "sha256-btWE4hUI+cQvBG3b8H5pan+v1fYEm88LmogbRZjXOdw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", + "rev": "3b7080affa3142f035891aabab1e568fd444c7e5", "type": "github" }, "original": { "owner": "nixos", - "ref": "release-23.11", + "ref": "release-25.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-lib": { "locked": { - "dir": "lib", - "lastModified": 1685564631, - "narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a", + "lastModified": 1769909678, + "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "72716169fe93074c333e8d0173151350670b824c", "type": "github" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", + "owner": "nix-community", + "repo": "nixpkgs.lib", "type": "github" } }, @@ -503,6 +471,22 @@ "terranix": "terranix" } }, + "spectrum": { + "flake": false, + "locked": { + "lastModified": 1759482047, + "narHash": "sha256-H1wiXRQHxxPyMMlP39ce3ROKCwI5/tUn36P8x6dFiiQ=", + "ref": "refs/heads/main", + "rev": "c5d5786d3dc938af0b279c542d1e43bce381b4b9", + "revCount": 996, + "type": "git", + "url": "https://spectrum-os.org/git/spectrum" + }, + "original": { + "type": "git", + "url": "https://spectrum-os.org/git/spectrum" + } + }, "std": { "inputs": { "arion": [ @@ -538,13 +522,16 @@ "yants": "yants" }, "locked": { - "lastModified": 0, - "narHash": "sha256-fiGxfoXDVBJzBLpoxPwdM/AcRq/dNIeZLNrMqgmuhNk=", - "path": "/nix/store/b0qrhagsdpgyw9hx9wzrszwsdg5wfnnd-source", - "type": "path" + "lastModified": 1772127938, + "narHash": "sha256-peYU8Fd5qYKMZpBMxKWFW6UHq+Qf8fLR2kpcQ8irBTw=", + "ref": "refs/heads/fix/upgrade-flake-lock", + "rev": "7c75c6d51d37fd4c7567ed0159497470d77e9c73", + "revCount": 836, + "type": "git", + "url": "file:///Users/m/code-des-autres/std/src/tests/../.." }, "original": { - "path": "/nix/store/b0qrhagsdpgyw9hx9wzrszwsdg5wfnnd-source", + "path": "../../", "type": "path" } }, @@ -563,38 +550,21 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "terranix": { "inputs": { - "bats-assert": [], - "bats-support": [], - "flake-utils": "flake-utils_4", + "flake-parts": "flake-parts_3", "nixpkgs": [ "std", "nixpkgs" ], - "terranix-examples": [] + "systems": "systems" }, "locked": { - "lastModified": 1684906298, - "narHash": "sha256-pNuJxmVMGbBHw7pa+Bx0HY0orXIXoyyAXOKuQ1zpfus=", + "lastModified": 1772084625, + "narHash": "sha256-NHVyzvrcMEnRU8pp9ATTfn4+QPQT50leQg5JFbM+pz0=", "owner": "terranix", "repo": "terranix", - "rev": "c0dd15076856c6cb425795b8c7d5d37d3a1e922a", + "rev": "56f22d4c477a552d2aa13bfa6251ff34e7c05ce2", "type": "github" }, "original": { diff --git a/tests/_snapshots/check-augmented-cell-inputs b/tests/_snapshots/check-augmented-cell-inputs index 126630fa..88c3f073 100644 --- a/tests/_snapshots/check-augmented-cell-inputs +++ b/tests/_snapshots/check-augmented-cell-inputs @@ -1,22 +1,22 @@ #pretty { - arion = "/nix/store/8px6k532a5fvz0k7ckhj3kfyqxbhz317-source"; + arion = "/nix/store/jq98iqdcqyyfarjmkbnzjnk50rdvlpja-source"; blank = "/nix/store/scflkbbsqxlzxvja3gm4xf1y2kvsww32-source"; cells = "no .outPath"; - devshell = "/nix/store/gadmzrrq2dygvzy3yqp5x7gfbd7l2pw1-source"; + devshell = "/nix/store/hh6i9rnxx1v6azzva6dc3ivglh9bxnzg-source"; dmerge = "/nix/store/8b67fxqldqv1x3x07nhabb9ild2zl6rz-source"; - flake-parts = "/nix/store/jiyanhix45y0a7m9nsrng44yjzrp79m9-source"; + flake-parts = "/nix/store/j5qcw5x2dm0jlffwwymp6yav62l3pdqm-source"; haumea = "/nix/store/ih873qmabdsdgk1naaiv6v7jy1mxq241-source"; incl = "/nix/store/9yriyvqkcvhqwizwdbsblk3pp0dkgim2-source"; - lib = "/nix/store/0vvdgp2wdj9q0kqgakgax3bwhkd152rx-source"; - makes = "/nix/store/71rzg7vs53gmxqph64d9zqf4ns928c6c-source"; - microvm = "/nix/store/v5za7dzczgcvfvqgcm80qari3msyhw6b-source"; - n2c = "/nix/store/rgd4s5ylv38p94wi6vays6wc1a0l5iyf-source"; + lib = "/nix/store/hz9wgm1chlnk6yj9i3gsqrx8k361j5h5-source"; + makes = "/nix/store/c1silm3bs5g86rvhmjz8vm2lmgjnchzw-source"; + microvm = "/nix/store/d5jjdll38cv7w85mb8v40r0y4n7k6zmw-source"; + n2c = "/nix/store/m0m72b7nj91pfyfbblzhi7k7c2cxpb6b-source"; namaka = "/nix/store/prb836vl3r64l97045clfli0d5m5fyap-source"; - nixago = "/nix/store/cys15p6lyyhj85bk4bckn82waih2l945-source"; - nixpkgs = "/nix/store/g8zzlf6drg73c987ii390yicq4c0j778-source"; + nixago = "/nix/store/6pb5g5b93dg3fvcys8pq9b0baj4k11mj-source"; + nixpkgs = "/nix/store/4jrlc8a5798jx9l5pvgv002jvq9iz6wy-source"; paisano = "/nix/store/4v8nn2z2vl74yz1557n1dha3l7rzzbgs-source"; paisano-tui = "/nix/store/rdrvzcs8j77fccnkky6p2sagc0d49hyy-source"; - terranix = "/nix/store/agasgh0qgqi0fxk3zzgrjvqpx6k8036c-source"; + terranix = "/nix/store/p35a0z78v1nq298nwzlq8vvc6r2qzxf4-source"; yants = "/nix/store/np6pvhkza8grv26qypzpibwrrg7kqxkc-source"; } \ No newline at end of file diff --git a/tests/bt-blocktypes/expr.nix b/tests/bt-blocktypes/expr.nix index 1fb80e3f..d2c3dbba 100644 --- a/tests/bt-blocktypes/expr.nix +++ b/tests/bt-blocktypes/expr.nix @@ -69,8 +69,11 @@ removeAttrs ({ terra = f n "myrepo"; } - .${n} - or (f n)) ["__functor"]; + .${ + n + } + or (f + n)) ["__functor"]; # fake snapshot compliance across systems FakeActionsForOtherSystems = let fakeDrv = name: @@ -115,7 +118,9 @@ in ( dmerge {${n} = actions';} FakeActionsForOtherSystems ) - .${n}; + .${ + n + }; in pipe r [ (map trimProvisoPath) diff --git a/tests/cells-lib-cfg/expr.nix b/tests/cells-lib-cfg/expr.nix index 0bbdf1e5..399faf0b 100644 --- a/tests/cells-lib-cfg/expr.nix +++ b/tests/cells-lib-cfg/expr.nix @@ -16,8 +16,11 @@ in tasks = {}; }; } - .${n} - or {}; + .${ + n + } + or { + }; } ) .configFile diff --git a/tests/cells-lib-dev/expr.nix b/tests/cells-lib-dev/expr.nix index 8a00bdc0..9065a2c5 100644 --- a/tests/cells-lib-dev/expr.nix +++ b/tests/cells-lib-dev/expr.nix @@ -17,7 +17,9 @@ in .out .dockerComposeYaml; } - .${n} + .${ + n + } or "missing-test" ) dev diff --git a/tests/cells-lib-ops/expr.nix b/tests/cells-lib-ops/expr.nix index 5d611baf..da7ad8d0 100644 --- a/tests/cells-lib-ops/expr.nix +++ b/tests/cells-lib-ops/expr.nix @@ -28,7 +28,9 @@ in devshell = dev.mkShell {name = "Test";}; }; } - .${n} + .${ + n + } or "missing-test" ) ops