Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .envrc
Original file line number Diff line number Diff line change
@@ -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=")"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/std.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ${{ inputs.runs-on }}
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
# - uses: DeterminateSystems/magic-nix-cache-action@main
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/update-subflake.sh
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -70,7 +71,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;};
Expand Down
Loading