Skip to content

Commit fec2082

Browse files
Update nix flake inputs structure and add rv-nix-tools to dependency update workflow (#4824)
This pull request adapts the nix flake inputs structure regarding `nixpkgs` and `rv-nix-tools`. In particular, `nixpkgs` is now specified for inputs and transitive inputs by following an explicitly specified revision of `rv-nix-tools`. More thorough reasoning for this change is outlined in documentation added by this PR runtimeverification/rv-nix-tools#14. This change is done to make `nixpkgs` properly updatable by CI. In addition, this pull requests adapts the `update-deps.yml` workflow to also update `rv-nix-tools` that is used to implicitly specify the revision of `nixpkgs`. --------- Co-authored-by: Freeman <105403280+F-WRunTime@users.noreply.github.com>
1 parent 8e0f226 commit fec2082

5 files changed

Lines changed: 95 additions & 24 deletions

File tree

.github/workflows/test-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ jobs:
209209
uses: cachix/cachix-action@v14
210210
with:
211211
name: k-framework
212+
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
212213
skipPush: true
213214
- name: 'Build K Framework and push build time dependencies to cachix'
214215
env:

.github/workflows/update-deps.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- '_update-deps/runtimeverification/llvm-backend'
66
- '_update-deps/runtimeverification/haskell-backend'
7+
- '_update-deps/runtimeverification/rv-nix-tools'
78
workflow_dispatch:
89
# Stop in progress workflows on the same branch and same workflow to use latest committed code
910
concurrency:
@@ -64,6 +65,12 @@ jobs:
6465
changed=true
6566
fi
6667
68+
RV_NIX_TOOLS_VERSION=$(cat deps/rv-nix-tools)
69+
sed -i 's! rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/[a-z0-9\.]*"! rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/'"${RV_NIX_TOOLS_VERSION}"'"!' flake.nix
70+
if git add flake.nix && git commit -m "flake.nix, rv-nix-tools: update to revision ${RV_NIX_TOOLS_VERSIONs}"; then
71+
changed=true
72+
fi
73+
6774
nix flake update
6875
if git add flake.lock && git commit -m 'flake.lock: update'; then
6976
changed=true

deps/rv-nix-tools

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
854d4f05ea78547d46e807b414faad64cea10ae4

flake.lock

Lines changed: 76 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
{
22
description = "K Framework";
33
inputs = {
4+
rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/854d4f05ea78547d46e807b414faad64cea10ae4";
5+
nixpkgs.follows = "rv-nix-tools/nixpkgs";
6+
47
llvm-backend.url = "github:runtimeverification/llvm-backend/v0.1.132";
8+
llvm-backend.inputs.nixpkgs.follows = "nixpkgs";
9+
510
haskell-backend = {
611
url = "github:runtimeverification/haskell-backend/v0.1.126";
7-
inputs.rv-utils.follows = "llvm-backend/rv-utils";
8-
inputs.nixpkgs.follows = "llvm-backend/nixpkgs";
12+
inputs.rv-nix-tools.follows = "llvm-backend/rv-nix-tools";
13+
inputs.nixpkgs.follows = "nixpkgs";
914
};
1015

1116
poetry2nix = {
1217
url = "github:nix-community/poetry2nix/2024.9.219347";
13-
inputs.nixpkgs.follows = "llvm-backend/nixpkgs";
18+
inputs.nixpkgs.follows = "nixpkgs";
1419
};
1520

16-
nixpkgs.follows = "llvm-backend/nixpkgs";
17-
rv-utils.follows = "llvm-backend/rv-utils";
1821
flake-utils.follows = "llvm-backend/utils";
1922
};
2023

21-
outputs = { self, nixpkgs, flake-utils, rv-utils, haskell-backend
24+
outputs = { self, nixpkgs, flake-utils, rv-nix-tools, haskell-backend
2225
, llvm-backend, poetry2nix }:
2326
let
2427
allOverlays = [
@@ -180,7 +183,7 @@
180183
packages = rec {
181184
inherit (pkgs) k k-lock pyk pyk-python310 pyk-python311 maven;
182185

183-
check-submodules = rv-utils.lib.check-submodules pkgs {
186+
check-submodules = rv-nix-tools.lib.check-submodules pkgs {
184187
inherit llvm-backend haskell-backend;
185188
};
186189

0 commit comments

Comments
 (0)