Skip to content

Update nix flake inputs structure and add rv-nix-tools to dependency update workflow #2767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
3 changes: 3 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- '_update-deps/runtimeverification/blockchain-k-plugin'
- '_update-deps/runtimeverification/k'
- '_update-deps/runtimeverification/rv-nix-tools'
workflow_dispatch:
# Stop in progress workflows on the same branch and same workflow to use latest committed code
concurrency:
Expand Down Expand Up @@ -52,8 +53,10 @@ jobs:
run: |
K_VERSION=v$(cat deps/k_release)
BKP_VERSION=$(cat deps/blockchain-k-plugin_release)
RV_NIX_TOOLS_VERSION=$(cat deps/rv-nix-tools)
sed -i 's! k-framework.url = "github:runtimeverification/k/[v0-9\.]*"! k-framework.url = "github:runtimeverification/k/'"${K_VERSION}"'"!' flake.nix
sed -i 's! "github:runtimeverification/blockchain-k-plugin/[0-9a-f]*"! "github:runtimeverification/blockchain-k-plugin/'"${BKP_VERSION}"'"!' flake.nix
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
nix run .#update-from-submodules
nix flake update
git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true
Expand Down
1 change: 1 addition & 0 deletions deps/rv-nix-tools
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
854d4f05ea78547d46e807b414faad64cea10ae4
45 changes: 37 additions & 8 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
description = "A flake for the KEVM Semantics";

inputs = {
rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/854d4f05ea78547d46e807b414faad64cea10ae4";
nixpkgs.follows = "rv-nix-tools/nixpkgs";

k-framework.url = "github:runtimeverification/k/v7.1.259";
nixpkgs.follows = "k-framework/nixpkgs";
k-framework.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.follows = "k-framework/flake-utils";
rv-utils.follows = "k-framework/rv-utils";
poetry2nix.follows = "k-framework/poetry2nix";
poetry2nix.inputs.nixpkgs.follows = "nixpkgs";
blockchain-k-plugin = {
url =
"github:runtimeverification/blockchain-k-plugin/1fda07d61df64ef9ae2ea87e6f767a02d30d4599";
inputs.flake-utils.follows = "k-framework/flake-utils";
inputs.nixpkgs.follows = "k-framework/nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
haskell-backend.follows = "k-framework/haskell-backend";
};
outputs = { self, k-framework, haskell-backend, nixpkgs, flake-utils
, blockchain-k-plugin, rv-utils, ... }@inputs:
, blockchain-k-plugin, rv-nix-tools, ... }@inputs:
let
nixLibs = pkgs:
with pkgs;
Expand Down Expand Up @@ -217,12 +220,12 @@
] ./.);
};

check-submodules = rv-utils.lib.check-submodules pkgs {
check-submodules = rv-nix-tools.lib.check-submodules pkgs {
inherit k-framework blockchain-k-plugin;
};

update-from-submodules =
rv-utils.lib.update-from-submodules pkgs ./flake.lock {
rv-nix-tools.lib.update-from-submodules pkgs ./flake.lock {
blockchain-k-plugin.submodule = "deps/plugin";
};
};
Expand Down