Skip to content

Commit f7d4150

Browse files
authored
Update nix flake inputs structure and add rv-nix-tools to dependency update workflow (#1207)
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`.
1 parent facee2b commit f7d4150

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

.github/workflows/update-deps.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- '_update-deps/runtimeverification/scala-kore'
6+
- '_update-deps/runtimeverification/rv-nix-tools'
67
workflow_dispatch:
78
# Stop in progress workflows on the same branch and same workflow to use latest committed code
89
concurrency:
@@ -25,8 +26,23 @@ jobs:
2526
git config user.name devops
2627
git config user.email [email protected]
2728
29+
- name: 'Install Nix'
30+
uses: cachix/install-nix-action@v22
31+
with:
32+
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
33+
extra_nix_config: |
34+
substituters = http://cache.nixos.org https://hydra.iohk.io
35+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
36+
2837
- name: 'Update scala-kore release tag'
2938
run: ./scripts/update-scala-kore.sh
3039

40+
- name: 'Update Nix flake inputs'
41+
run: |
42+
RV_NIX_TOOLS_VERSION=$(cat deps/rv-nix-tools)
43+
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
44+
nix flake update
45+
git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true
46+
3147
- name: 'Push updates'
3248
run: git push

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: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
description = "K Kore Language LLVM Backend";
33

44
inputs = {
5+
rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/854d4f05ea78547d46e807b414faad64cea10ae4";
6+
nixpkgs.follows = "rv-nix-tools/nixpkgs";
7+
58
utils.url = "github:numtide/flake-utils";
6-
rv-utils.url = "github:runtimeverification/rv-nix-tools";
7-
nixpkgs.follows = "rv-utils/nixpkgs";
89

910
fmt-src.url =
1011
"github:fmtlib/fmt/9.1.0";

0 commit comments

Comments
 (0)