From 521a6c82f6af808b4bffa09170ba5acc1e490e5a Mon Sep 17 00:00:00 2001 From: Bruce Collie Date: Thu, 11 Jul 2024 11:26:49 +0200 Subject: [PATCH] Simplify Nix code (#674) * Simplify Nix usage * Remove separate pyk version bump * Set Version: 0.1.82 --------- Co-authored-by: devops --- .github/workflows/update-version.yml | 1 - flake.lock | 186 +-------------------------- flake.nix | 11 +- package/version | 2 +- pykwasm/pyproject.toml | 2 +- 5 files changed, 8 insertions(+), 194 deletions(-) diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 42daba4b8..566f84162 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -47,7 +47,6 @@ jobs: run: | K_VERSION=v"$(cat deps/k_release)" sed -i 's! k-framework.url = "github:runtimeverification/k/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+"! k-framework.url = "github:runtimeverification/k/'"${K_VERSION}"'"!' flake.nix - sed -i 's! pyk.url = "github:runtimeverification/k/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+?dir=pyk"! pyk.url = "github:runtimeverification/k/'"${K_VERSION}"'?dir=pyk"!' flake.nix nix flake update git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true - name: 'Push updates' diff --git a/flake.lock b/flake.lock index 45fa126e1..605a9d62d 100644 --- a/flake.lock +++ b/flake.lock @@ -34,24 +34,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "fmt-src": { "flake": false, "locked": { @@ -205,28 +187,6 @@ "type": "github" } }, - "nix-github-actions_2": { - "inputs": { - "nixpkgs": [ - "pyk", - "poetry2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1693660503, - "narHash": "sha256-B/g2V4v6gjirFmy+I5mwB2bCYc0l3j5scVfwgl6WOl8=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "bd5bdbb52350e145c526108f4ef192eb8e554fa0", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1716457947, @@ -243,22 +203,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1716457947, - "narHash": "sha256-Y+exebcqeprnhEpoPJrEUZmNeO60qeOxkVHhqG/OEwQ=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "69493a13eaea0dc4682fd07e8a084f17813dbeeb", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "69493a13eaea0dc4682fd07e8a084f17813dbeeb", - "type": "github" - } - }, "poetry2nix": { "inputs": { "flake-utils": "flake-utils", @@ -286,32 +230,6 @@ "type": "github" } }, - "poetry2nix_2": { - "inputs": { - "flake-utils": "flake-utils_2", - "nix-github-actions": "nix-github-actions_2", - "nixpkgs": [ - "pyk", - "nixpkgs" - ], - "systems": "systems_5", - "treefmt-nix": "treefmt-nix_2" - }, - "locked": { - "lastModified": 1698640399, - "narHash": "sha256-mXzyx79/iFLZ0UDuSkqgFfejYRcSJfsCnJ9WlMusaI0=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "626111646fe236cb1ddc8191a48c75e072a82b7c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "626111646fe236cb1ddc8191a48c75e072a82b7c", - "type": "github" - } - }, "pybind11-src": { "flake": false, "locked": { @@ -329,38 +247,6 @@ "type": "github" } }, - "pyk": { - "inputs": { - "flake-utils": [ - "pyk", - "poetry2nix", - "flake-utils" - ], - "nixpkgs": [ - "pyk", - "rv-utils", - "nixpkgs" - ], - "poetry2nix": "poetry2nix_2", - "rv-utils": "rv-utils_2" - }, - "locked": { - "dir": "pyk", - "lastModified": 1720638169, - "narHash": "sha256-Pxl5c5Ti3Dt+p3IKhwZNONiYHwELdypd39U6AQB51D0=", - "owner": "runtimeverification", - "repo": "k", - "rev": "349304ae7c223dd7451cd0671ab8c865c3e2994e", - "type": "github" - }, - "original": { - "dir": "pyk", - "owner": "runtimeverification", - "ref": "v7.1.54", - "repo": "k", - "type": "github" - } - }, "rapidjson-src": { "flake": false, "locked": { @@ -390,10 +276,9 @@ "nixpkgs" ], "poetry2nix": [ - "pyk", + "k-framework", "poetry2nix" ], - "pyk": "pyk", "rv-utils": [ "k-framework", "rv-utils" @@ -418,24 +303,6 @@ "type": "github" } }, - "rv-utils_2": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1716459074, - "narHash": "sha256-IpahO+EkWdGl9QP7B2YXfJWpSfghjxgpz4ab47nRJY4=", - "owner": "runtimeverification", - "repo": "rv-nix-tools", - "rev": "a65058865cda201de504f5546271b8e997a0be9c", - "type": "github" - }, - "original": { - "owner": "runtimeverification", - "repo": "rv-nix-tools", - "type": "github" - } - }, "stacklock2nix": { "locked": { "lastModified": 1705051190, @@ -495,35 +362,6 @@ "type": "indirect" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "id": "systems", - "type": "indirect" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -546,28 +384,6 @@ "type": "github" } }, - "treefmt-nix_2": { - "inputs": { - "nixpkgs": [ - "pyk", - "poetry2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1697388351, - "narHash": "sha256-63N2eBpKaziIy4R44vjpUu8Nz5fCJY7okKrkixvDQmY=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "aae39f64f5ecbe89792d05eacea5cb241891292a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "utils": { "inputs": { "systems": "systems" diff --git a/flake.nix b/flake.nix index 473613a9c..983e1e6ec 100644 --- a/flake.nix +++ b/flake.nix @@ -6,12 +6,11 @@ nixpkgs.follows = "k-framework/nixpkgs"; flake-utils.follows = "k-framework/flake-utils"; rv-utils.follows = "k-framework/rv-utils"; - pyk.url = "github:runtimeverification/k/v7.1.54?dir=pyk"; - poetry2nix.follows = "pyk/poetry2nix"; + poetry2nix.follows = "k-framework/poetry2nix"; }; outputs = - { self, k-framework, nixpkgs, flake-utils, rv-utils, pyk, poetry2nix }: + { self, k-framework, nixpkgs, flake-utils, rv-utils, poetry2nix }: let overlay = (final: prev: let @@ -28,7 +27,7 @@ inherit src version; buildInputs = with prev; [ - k-framework.packages.${system}.k + k final.kwasm-pyk python310 ]; @@ -50,7 +49,7 @@ --prefix PATH : ${ prev.lib.makeBinPath [ prev.which - k-framework.packages.${prev.system}.k + prev.k ] } \ --set KDIST_DIR $out @@ -131,7 +130,7 @@ inherit system; overlays = [ poetry2nix.overlays.default - pyk.overlay + k-framework.overlay overlay ]; }; diff --git a/package/version b/package/version index 962d1c105..59e55c1f1 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.1.81 +0.1.82 diff --git a/pykwasm/pyproject.toml b/pykwasm/pyproject.toml index 7bf599a66..7f836eb92 100644 --- a/pykwasm/pyproject.toml +++ b/pykwasm/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pykwasm" -version = "0.1.81" +version = "0.1.82" description = "" authors = [ "Runtime Verification, Inc. ",