File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- # first time
4- if [[ ! -d $( nix store add-path --name source --dry-run .) ]]; then
5- nix store add-path --name source .
6- (cd ./src/local && nix flake lock --update-input std)
7- (cd ./src/tests && nix flake lock --update-input std)
8- fi
3+ # This locks subflakes to the latest commit of std
4+ (cd ./src/local && nix flake lock --override-input std git+file://$( pwd) /../..? rev=$( git -C ../.. rev-parse HEAD) )
5+ (cd ./src/tests && nix flake lock --override-input std git+file://$( pwd) /../..? rev=$( git -C ../.. rev-parse HEAD) )
96
107# shellcheck disable=SC1090
118. " $( fetchurl " https://raw.githubusercontent.com/paisano-nix/direnv/main/lib" " sha256-IgQhKK7UHL1AfCUntJO2KCaIDJQotRnK2qC4Daxk+wI=" ) "
Original file line number Diff line number Diff line change 11# create the store path of
2- nix store add-path --name source .
2+ nix store add --name source .
33
4- # update the subflake lockfile to the (now existing) store path
5- # set lastModified to 1 because unknown issues in the GH action environment
6- (cd ./src/local && nix flake lock --update-input std && (
7- jq ' .nodes.std.locked.lastModified = 1' flake.lock > flake.lock.new && rm flake.lock && mv flake.lock.new flake.lock
8- ) && git add -f flake.lock)
9- (cd ./src/tests && nix flake lock --update-input std && (
10- jq ' .nodes.std.locked.lastModified = 1' flake.lock > flake.lock.new && rm flake.lock && mv flake.lock.new flake.lock
11- ) && git add -f flake.lock)
12- # continue normally ...
4+ # This locks subflakes to the latest commit of std
5+ (cd ./src/local && nix flake lock --override-input std git+file://$( pwd) /../..? rev=$( git -C ../.. rev-parse HEAD) & shallow=1)
6+ (cd ./src/tests && nix flake lock --override-input std git+file://$( pwd) /../..? rev=$( git -C ../.. rev-parse HEAD) & shallow=1)
You can’t perform that action at this time.
0 commit comments