From 69cf045bf18965dd77d30f9adba1a1d84d83ff87 Mon Sep 17 00:00:00 2001 From: "guillem.cordoba" Date: Mon, 23 Sep 2024 12:58:14 +0200 Subject: [PATCH 1/5] Debug to allow for macos testing --- nix/fixtures/module-repo/zomes/coordinator/zome.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/fixtures/module-repo/zomes/coordinator/zome.nix b/nix/fixtures/module-repo/zomes/coordinator/zome.nix index ffa9255..ab5183b 100644 --- a/nix/fixtures/module-repo/zomes/coordinator/zome.nix +++ b/nix/fixtures/module-repo/zomes/coordinator/zome.nix @@ -33,7 +33,7 @@ ''; zomes = { my_zome = self'.packages.my_zome; }; inherit system; - }; + }.meta.debug; crateCargoToml = ./Cargo.toml; cargoArtifacts = inputs.hc-infra.lib.holochainCargoArtifacts { inherit system; }; From 301f5119bb9408d117ac13c30674620f0f43c909 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 07:10:56 +0000 Subject: [PATCH 2/5] [create-pull-request] automated change (#88) Co-authored-by: guillemcordoba --- flake.lock | 6 +++--- nix/fixtures/module-repo/Cargo.lock | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index e436715..e7f796e 100644 --- a/flake.lock +++ b/flake.lock @@ -157,11 +157,11 @@ }, "pnpmnixpkgs": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1726969270, + "narHash": "sha256-8fnFlXBgM/uSvBlLWjZ0Z0sOdRBesyNdH0+esxqizGc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "23cbb250f3bf4f516a2d0bf03c51a30900848075", "type": "github" }, "original": { diff --git a/nix/fixtures/module-repo/Cargo.lock b/nix/fixtures/module-repo/Cargo.lock index 33cf48d..9f37e64 100644 --- a/nix/fixtures/module-repo/Cargo.lock +++ b/nix/fixtures/module-repo/Cargo.lock @@ -4881,9 +4881,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polling" From 761627dda2a435b3bffc069c0e666a3d7f56ce91 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 07:11:48 +0000 Subject: [PATCH 3/5] [create-pull-request] automated change (#90) Co-authored-by: guillemcordoba --- flake.lock | 12 +++---- nix/fixtures/module-repo/Cargo.lock | 54 +++++++++-------------------- nix/reference-happ/Cargo.lock | 54 +++++++++-------------------- 3 files changed, 38 insertions(+), 82 deletions(-) diff --git a/flake.lock b/flake.lock index e7f796e..183f4df 100644 --- a/flake.lock +++ b/flake.lock @@ -96,11 +96,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -157,11 +157,11 @@ }, "pnpmnixpkgs": { "locked": { - "lastModified": 1726969270, - "narHash": "sha256-8fnFlXBgM/uSvBlLWjZ0Z0sOdRBesyNdH0+esxqizGc=", + "lastModified": 1727129439, + "narHash": "sha256-nPyrcFm6FSk7CxzVW4x2hu62aLDghNcv9dX6DF3dXw8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "23cbb250f3bf4f516a2d0bf03c51a30900848075", + "rev": "babc25a577c3310cce57c72d5bed70f4c3c3843a", "type": "github" }, "original": { diff --git a/nix/fixtures/module-repo/Cargo.lock b/nix/fixtures/module-repo/Cargo.lock index 9f37e64..91678c4 100644 --- a/nix/fixtures/module-repo/Cargo.lock +++ b/nix/fixtures/module-repo/Cargo.lock @@ -438,9 +438,9 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", @@ -3177,9 +3177,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -3190,7 +3190,6 @@ dependencies = [ "pin-project-lite", "socket2 0.5.7", "tokio", - "tower", "tower-service", "tracing", ] @@ -3891,9 +3890,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libflate" @@ -3963,7 +3962,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.4", + "redox_syscall 0.5.5", ] [[package]] @@ -4765,7 +4764,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.4", + "redox_syscall 0.5.5", "smallvec", "windows-targets 0.52.6", ] @@ -5472,9 +5471,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" +checksum = "62871f2d65009c0256aed1b9cfeeb8ac272833c404e13d53d400cd0dad7a2ac0" dependencies = [ "bitflags 2.6.0", ] @@ -6707,9 +6706,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -7073,9 +7072,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.21" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.5.0", "serde", @@ -7097,27 +7096,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - [[package]] name = "tower-service" version = "0.3.3" @@ -8386,9 +8364,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587" dependencies = [ "memchr", ] diff --git a/nix/reference-happ/Cargo.lock b/nix/reference-happ/Cargo.lock index d372fec..ecef008 100644 --- a/nix/reference-happ/Cargo.lock +++ b/nix/reference-happ/Cargo.lock @@ -438,9 +438,9 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", @@ -3177,9 +3177,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -3190,7 +3190,6 @@ dependencies = [ "pin-project-lite", "socket2 0.5.7", "tokio", - "tower", "tower-service", "tracing", ] @@ -3891,9 +3890,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libflate" @@ -3963,7 +3962,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.4", + "redox_syscall 0.5.5", ] [[package]] @@ -4743,7 +4742,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.4", + "redox_syscall 0.5.5", "smallvec", "windows-targets 0.52.6", ] @@ -5450,9 +5449,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" +checksum = "62871f2d65009c0256aed1b9cfeeb8ac272833c404e13d53d400cd0dad7a2ac0" dependencies = [ "bitflags 2.6.0", ] @@ -6685,9 +6684,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -7051,9 +7050,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.21" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.5.0", "serde", @@ -7075,27 +7074,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - [[package]] name = "tower-service" version = "0.3.3" @@ -8364,9 +8342,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587" dependencies = [ "memchr", ] From 109f92003d75e50553d4a4e99f76421242fea213 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 07:11:09 +0000 Subject: [PATCH 4/5] [create-pull-request] automated change (#91) Co-authored-by: guillemcordoba --- flake.lock | 6 +++--- nix/fixtures/module-repo/Cargo.lock | 16 ++++++++-------- nix/reference-happ/Cargo.lock | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index 183f4df..be605d5 100644 --- a/flake.lock +++ b/flake.lock @@ -157,11 +157,11 @@ }, "pnpmnixpkgs": { "locked": { - "lastModified": 1727129439, - "narHash": "sha256-nPyrcFm6FSk7CxzVW4x2hu62aLDghNcv9dX6DF3dXw8=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "babc25a577c3310cce57c72d5bed70f4c3c3843a", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { diff --git a/nix/fixtures/module-repo/Cargo.lock b/nix/fixtures/module-repo/Cargo.lock index 91678c4..0203dde 100644 --- a/nix/fixtures/module-repo/Cargo.lock +++ b/nix/fixtures/module-repo/Cargo.lock @@ -3962,7 +3962,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.5", + "redox_syscall 0.5.6", ] [[package]] @@ -4764,7 +4764,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.5", + "redox_syscall 0.5.6", "smallvec", "windows-targets 0.52.6", ] @@ -5471,9 +5471,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62871f2d65009c0256aed1b9cfeeb8ac272833c404e13d53d400cd0dad7a2ac0" +checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" dependencies = [ "bitflags 2.6.0", ] @@ -6191,9 +6191,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -8364,9 +8364,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.19" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] diff --git a/nix/reference-happ/Cargo.lock b/nix/reference-happ/Cargo.lock index ecef008..6bacaad 100644 --- a/nix/reference-happ/Cargo.lock +++ b/nix/reference-happ/Cargo.lock @@ -3962,7 +3962,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.5", + "redox_syscall 0.5.6", ] [[package]] @@ -4742,7 +4742,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.5", + "redox_syscall 0.5.6", "smallvec", "windows-targets 0.52.6", ] @@ -5449,9 +5449,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62871f2d65009c0256aed1b9cfeeb8ac272833c404e13d53d400cd0dad7a2ac0" +checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" dependencies = [ "bitflags 2.6.0", ] @@ -6169,9 +6169,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -8342,9 +8342,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.19" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] From c093289dc39fcc0b6c8e5ed63cba704cea69b590 Mon Sep 17 00:00:00 2001 From: "guillem.cordoba" Date: Thu, 26 Sep 2024 12:40:53 +0200 Subject: [PATCH 5/5] Refactor builders --- Cargo.lock | 173 ++++++-------- crates/compare_dnas_integrity/default.nix | 2 +- .../nix_scaffolding_utils/fixture/flake.nix | 11 +- crates/scaffold_remote_zome/Cargo.toml | 3 + crates/scaffold_remote_zome/default.nix | 2 +- crates/scaffold_remote_zome/fixture/dna.nix | 20 +- crates/scaffold_remote_zome/fixture/flake.nix | 13 +- crates/scaffold_remote_zome/src/lib.rs | 48 ++-- .../default.nix | 2 +- crates/zome_wasm_hash/default.nix | 2 +- flake.nix | 223 ++++++++---------- nix/builders-option.nix | 15 ++ nix/dependencies-option.nix | 30 +++ nix/dna.nix | 13 +- nix/fixtures/app-repo/flake.lock | 64 ++--- nix/fixtures/app-repo/happ/happ.nix | 3 +- nix/fixtures/module-repo/flake.lock | 20 +- nix/fixtures/module-repo/flake.nix | 6 +- .../module-repo/zomes/coordinator/zome.nix | 15 +- .../module-repo/zomes/integrity/zome.nix | 16 +- nix/fixtures/service-repo/dna/dna.nix | 3 +- nix/fixtures/service-repo/flake.lock | 42 ++-- nix/happ.nix | 10 +- nix/zome.nix | 12 +- 24 files changed, 352 insertions(+), 396 deletions(-) create mode 100644 nix/builders-option.nix create mode 100644 nix/dependencies-option.nix diff --git a/Cargo.lock b/Cargo.lock index 4b5df01..3427d47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,9 +137,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "approx" @@ -161,9 +161,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -173,9 +173,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", @@ -378,9 +378,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] @@ -428,9 +428,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ "shlex", ] @@ -500,9 +500,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -510,9 +510,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", @@ -522,9 +522,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -559,7 +559,7 @@ name = "compare_dnas_integrity" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.5.17", + "clap 4.5.18", "holochain_types", "tokio", ] @@ -2086,9 +2086,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -2099,16 +2099,15 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2213,7 +2212,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "232929e1d75fe899576a3d5c7416ad0d88dbfbb3c3d6aa00873a7408a50ddb88" dependencies = [ "ahash 0.8.11", - "clap 4.5.17", + "clap 4.5.18", "crossbeam-channel", "crossbeam-utils", "dashmap 6.1.0", @@ -2457,9 +2456,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libflate" @@ -2504,9 +2503,9 @@ dependencies = [ [[package]] name = "libsodium-sys-stable" -version = "1.21.1" +version = "1.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd1882b85f01cdd4021c0664fd897710a04c5d01b593a5a70e1b0baa999c1f8" +checksum = "42631d334de875c636a1aae7adb515653ac2e771e5a2ce74b1053f5a4412df3a" dependencies = [ "cc", "libc", @@ -2777,7 +2776,7 @@ version = "0.1.0" dependencies = [ "anyhow", "build-fs-tree", - "clap 4.5.17", + "clap 4.5.18", "colored", "file_tree_utils", "ignore", @@ -2804,7 +2803,7 @@ version = "0.1.0" dependencies = [ "anyhow", "build-fs-tree", - "clap 4.5.17", + "clap 4.5.18", "colored", "dialoguer", "file_tree_utils", @@ -3038,7 +3037,7 @@ dependencies = [ [[package]] name = "parse-flake-lock" version = "0.1.1" -source = "git+https://github.com/DeterminateSystems/flake-checker?branch=main#fa7f6a38d3c3b8ed5ed45d92656a62d3b94dd1f5" +source = "git+https://github.com/DeterminateSystems/flake-checker?branch=main#af5a334d513f2e8b54df0296361a18c6112c04d2" dependencies = [ "serde", "serde_json", @@ -3074,9 +3073,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.12" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" dependencies = [ "memchr", "thiserror", @@ -3085,9 +3084,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.12" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664d22978e2815783adbdd2c588b455b1bd625299ce36b2a99881ac9627e6d8d" +checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" dependencies = [ "pest", "pest_generator", @@ -3095,9 +3094,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.12" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2d5487022d5d33f4c30d91c22afa240ce2a644e87fe08caad974d4eab6badbe" +checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" dependencies = [ "pest", "pest_meta", @@ -3108,9 +3107,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.12" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0091754bbd0ea592c4deb3a122ce8ecbb0753b738aa82bc055fcc2eccc8d8174" +checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" dependencies = [ "once_cell", "pest", @@ -3157,9 +3156,9 @@ checksum = "c1be1ec9e59f0360aefe84efa6f699198b685ab0d5718081e9f72aa2344289e2" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "powerfmt" @@ -3178,9 +3177,9 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -3364,9 +3363,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" dependencies = [ "bitflags 2.6.0", ] @@ -3662,7 +3661,7 @@ version = "0.1.0" dependencies = [ "anyhow", "build-fs-tree", - "clap 4.5.17", + "clap 4.5.18", "colored", "dialoguer", "file_tree_utils", @@ -3696,9 +3695,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.36" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -3795,7 +3794,7 @@ version = "0.1.0" dependencies = [ "anyhow", "build-fs-tree", - "clap 4.5.17", + "clap 4.5.18", "colored", "dialoguer", "file_tree_utils", @@ -3804,6 +3803,7 @@ dependencies = [ "nix_scaffolding_utils", "npm_scaffolding_utils", "path-clean", + "pretty_assertions", "regex", "serde", "serde_json", @@ -3892,9 +3892,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -4008,9 +4008,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -4166,9 +4166,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "slab" @@ -4452,9 +4452,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -4486,7 +4486,7 @@ version = "0.1.0" dependencies = [ "anyhow", "build-fs-tree", - "clap 4.5.17", + "clap 4.5.18", "convert_case 0.6.0", "file_tree_utils", "handlebars", @@ -4578,18 +4578,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -4738,9 +4738,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.5.0", "serde", @@ -4762,27 +4762,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - [[package]] name = "tower-service" version = "0.3.3" @@ -4912,24 +4891,24 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode_categories" @@ -5350,9 +5329,9 @@ dependencies = [ [[package]] name = "webc" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6cf1915e27168c1ed82f7f0d03f60317648f257fecaf4256a1904428d8e4ccd" +checksum = "c48441419be082f8d2537c84d8b1f502624d77bc08fbbd09ab17cadfe7f0ac53" dependencies = [ "anyhow", "base64 0.22.1", @@ -5670,9 +5649,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -5705,9 +5684,9 @@ checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yasna" @@ -5767,7 +5746,7 @@ name = "zome_wasm_hash" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.5.17", + "clap 4.5.18", "holochain_types", "tokio", ] diff --git a/crates/compare_dnas_integrity/default.nix b/crates/compare_dnas_integrity/default.nix index 835a1db..743e699 100644 --- a/crates/compare_dnas_integrity/default.nix +++ b/crates/compare_dnas_integrity/default.nix @@ -15,7 +15,7 @@ commonArgs = { src = craneLib.cleanCargoSource (craneLib.path ../../.); doCheck = false; - buildInputs = self.lib.holochainDeps { inherit pkgs lib; }; + buildInputs = self'.dependencies.holochain.buildInputs; }; cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { pname = "t-nesh-workspace"; diff --git a/crates/nix_scaffolding_utils/fixture/flake.nix b/crates/nix_scaffolding_utils/fixture/flake.nix index 3df8799..f943722 100644 --- a/crates/nix_scaffolding_utils/fixture/flake.nix +++ b/crates/nix_scaffolding_utils/fixture/flake.nix @@ -4,19 +4,14 @@ inputs = { nixpkgs.follows = "holochain/nixpkgs"; - versions.url = "github:holochain/holochain?dir=versions/0_3"; - - holochain = { - url = "github:holochain/holochain"; - inputs.versions.follows = "versions"; - }; + holonix.url = "github:holochain/holonix"; }; outputs = inputs@{ ... }: - inputs.holochain.inputs.flake-parts.lib.mkFlake { inherit inputs; } { + inputs.holonix.inputs.flake-parts.lib.mkFlake { inherit inputs; } { imports = [ ./dna.nix ]; - systems = builtins.attrNames inputs.holochain.devShells; + systems = builtins.attrNames inputs.holonix.devShells; perSystem = { inputs', config, pkgs, system, lib, self', ... }: { }; }; } diff --git a/crates/scaffold_remote_zome/Cargo.toml b/crates/scaffold_remote_zome/Cargo.toml index 6c48825..2dc6671 100644 --- a/crates/scaffold_remote_zome/Cargo.toml +++ b/crates/scaffold_remote_zome/Cargo.toml @@ -31,3 +31,6 @@ path-clean = "1" dialoguer = "0.11" colored = "2.1.0" holochain_types = "0.3.2" + +[dev-dependencies] +pretty_assertions = "1.4.1" diff --git a/crates/scaffold_remote_zome/default.nix b/crates/scaffold_remote_zome/default.nix index a712d02..5b13ed7 100644 --- a/crates/scaffold_remote_zome/default.nix +++ b/crates/scaffold_remote_zome/default.nix @@ -15,7 +15,7 @@ commonArgs = { src = craneLib.cleanCargoSource (craneLib.path ../../.); doCheck = false; - buildInputs = self.lib.holochainDeps { inherit pkgs lib; }; + buildInputs = self'.dependencies.holochain.buildInputs; }; cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { pname = "t-nesh-workspace"; diff --git a/crates/scaffold_remote_zome/fixture/dna.nix b/crates/scaffold_remote_zome/fixture/dna.nix index 11b7533..21010ce 100644 --- a/crates/scaffold_remote_zome/fixture/dna.nix +++ b/crates/scaffold_remote_zome/fixture/dna.nix @@ -1,19 +1,11 @@ { inputs, ... }: { - perSystem = - { inputs' - , self' - , lib - , ... - }: { - packages.forum = inputs.hc-infra.outputs.lib.dna { - dnaManifest = ./dna.yaml; - holochain = inputs'.holochain; - zomes = { - - }; - }; - }; + perSystem = { inputs', self', lib, system, ... }: { + packages.forum = inputs.hc-infra.outputs.builders.${system}.dna { + dnaManifest = ./dna.yaml; + zomes = { }; + }; + }; } diff --git a/crates/scaffold_remote_zome/fixture/flake.nix b/crates/scaffold_remote_zome/fixture/flake.nix index 3df8799..104e847 100644 --- a/crates/scaffold_remote_zome/fixture/flake.nix +++ b/crates/scaffold_remote_zome/fixture/flake.nix @@ -2,21 +2,16 @@ description = "Template for Holochain app development"; inputs = { - nixpkgs.follows = "holochain/nixpkgs"; + nixpkgs.follows = "holonix/nixpkgs"; - versions.url = "github:holochain/holochain?dir=versions/0_3"; - - holochain = { - url = "github:holochain/holochain"; - inputs.versions.follows = "versions"; - }; + holonix.url = "github:holochain/holonix"; }; outputs = inputs@{ ... }: - inputs.holochain.inputs.flake-parts.lib.mkFlake { inherit inputs; } { + inputs.holonix.inputs.flake-parts.lib.mkFlake { inherit inputs; } { imports = [ ./dna.nix ]; - systems = builtins.attrNames inputs.holochain.devShells; + systems = builtins.attrNames inputs.holonix.devShells; perSystem = { inputs', config, pkgs, system, lib, self', ... }: { }; }; } diff --git a/crates/scaffold_remote_zome/src/lib.rs b/crates/scaffold_remote_zome/src/lib.rs index 29f51ee..3715767 100644 --- a/crates/scaffold_remote_zome/src/lib.rs +++ b/crates/scaffold_remote_zome/src/lib.rs @@ -343,6 +343,7 @@ fn find_nixified_dnas(file_tree: &FileTree) -> Result, Scaffold #[cfg(test)] mod tests { use super::*; + use pretty_assertions::assert_eq; use build_fs_tree::{dir, file}; use file_tree_utils::file_content; @@ -426,19 +427,14 @@ coordinator: inputs = { profiles.url = "github:holochain-open-dev/profiles/nixify"; - nixpkgs.follows = "holochain/nixpkgs"; + nixpkgs.follows = "holonix/nixpkgs"; - versions.url = "github:holochain/holochain?dir=versions/weekly"; - - holochain = { - url = "github:holochain/holochain"; - inputs.versions.follows = "versions"; - }; + holonix.url = "github:holochain/holonix"; hc-infra.url = "github:holochain-open-dev/utils"; }; outputs = inputs @ { ... }: - inputs.holochain.inputs.flake-parts.lib.mkFlake + inputs.holonix.inputs.flake-parts.lib.mkFlake { inherit inputs; } @@ -447,7 +443,7 @@ coordinator: ./dna.nix ]; - systems = builtins.attrNames inputs.holochain.devShells; + systems = builtins.attrNames inputs.holonix.devShells; perSystem = { inputs' , config @@ -460,7 +456,7 @@ coordinator: devShells.default = pkgs.mkShell { inputsFrom = [ inputs'.hc-infra.devShells.synchronized-pnpm - inputs'.holochain.devShells.holonix + inputs'.holonix.devShells.default ]; }; }; @@ -477,20 +473,19 @@ coordinator: perSystem = { inputs' , self' + , system , ... }: { - packages.my_dna = inputs.hc-infra.outputs.lib.dna { + packages.my_dna = inputs.hc-infra.outputs.builders.${system}.dna { dnaManifest = ./dna.yaml; - holochain = inputs'.holochain; zomes = { profiles_integrity = inputs'.profiles.packages.profiles_integrity; profiles = inputs'.profiles.packages.profiles; }; }; - packages.another_dna = inputs.hc-infra.outputs.lib.dna { + packages.another_dna = inputs.hc-infra.outputs.builders.${system}.dna { dnaManifest = ./workdir/dna.yaml; - holochain = inputs'.holochain; zomes = { }; }; @@ -533,31 +528,23 @@ coordinator: description = "Template for Holochain app development"; inputs = { - nixpkgs.follows = "holochain/nixpkgs"; - - versions.url = "github:holochain/holochain?dir=versions/weekly"; + nixpkgs.follows = "holonix/nixpkgs"; - holochain = { - url = "github:holochain/holochain"; - inputs.versions.follows = "versions"; - }; + holonix.url = "github:holochain/holonix"; hc-infra.url = "github:holochain-open-dev/utils"; }; outputs = inputs @ { ... }: - inputs.holochain.inputs.flake-parts.lib.mkFlake + inputs.holonix.inputs.flake-parts.lib.mkFlake { inherit inputs; - specialArgs = { - rootPath = ./.; - }; } { imports = [ ./dna.nix ]; - systems = builtins.attrNames inputs.holochain.devShells; + systems = builtins.attrNames inputs.holonix.devShells; perSystem = { inputs' , config @@ -570,7 +557,7 @@ coordinator: devShells.default = pkgs.mkShell { inputsFrom = [ inputs'.hc-infra.devShells.synchronized-pnpm - inputs'.holochain.devShells.holonix + inputs'.holonix.devShells.default ]; }; }; @@ -588,18 +575,17 @@ coordinator: perSystem = { inputs' , self' + , system , ... }: { - packages.my_dna = inputs.hc-infra.outputs.lib.dna { + packages.my_dna = inputs.hc-infra.outputs.builders.${system}.dna { dnaManifest = ./dna.yaml; - holochain = inputs'.holochain; zomes = { }; }; - packages.another_dna = inputs.hc-infra.outputs.lib.dna { + packages.another_dna = inputs.hc-infra.outputs.builders.${system}.dna { dnaManifest = ./workdir/dna.yaml; - holochain = inputs'.holochain; zomes = { }; }; diff --git a/crates/sync_npm_git_dependencies_with_nix/default.nix b/crates/sync_npm_git_dependencies_with_nix/default.nix index ad9d5fd..4ec6af6 100644 --- a/crates/sync_npm_git_dependencies_with_nix/default.nix +++ b/crates/sync_npm_git_dependencies_with_nix/default.nix @@ -15,7 +15,7 @@ commonArgs = { src = craneLib.cleanCargoSource (craneLib.path ../../.); doCheck = false; - buildInputs = self.lib.holochainDeps { inherit pkgs lib; }; + buildInputs = self'.dependencies.holochain.buildInputs; }; cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { pname = "t-nesh-workspace"; diff --git a/crates/zome_wasm_hash/default.nix b/crates/zome_wasm_hash/default.nix index 757c7f8..2a752cf 100644 --- a/crates/zome_wasm_hash/default.nix +++ b/crates/zome_wasm_hash/default.nix @@ -15,7 +15,7 @@ commonArgs = { src = craneLib.cleanCargoSource (craneLib.path ../../.); doCheck = false; - buildInputs = self.lib.holochainDeps { inherit pkgs lib; }; + buildInputs = self'.dependencies.holochain.buildInputs; }; cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { pname = "t-nesh-workspace"; diff --git a/flake.nix b/flake.nix index f84b2d0..47c6881 100644 --- a/flake.nix +++ b/flake.nix @@ -16,168 +16,135 @@ rec { }; outputs = inputs@{ ... }: - inputs.holonix.inputs.flake-parts.lib.mkFlake { inherit inputs; } rec { + inputs.holonix.inputs.flake-parts.lib.mkFlake { inherit inputs; } { flake = { - lib = rec { - holochainDeps = { pkgs, lib }: - (with pkgs; [ perl openssl ]) - ++ (lib.optionals pkgs.stdenv.isLinux [ pkgs.pkg-config pkgs.go ]) - ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [ - pkgs.libiconv - - pkgs.darwin.apple_sdk.frameworks.AppKit - pkgs.darwin.apple_sdk.frameworks.WebKit - (pkgs.darwin.apple_sdk_11_0.stdenv.mkDerivation { - name = "go"; - nativeBuildInputs = with pkgs; [ makeBinaryWrapper go ]; - dontBuild = true; - dontUnpack = true; - installPhase = '' - makeWrapper ${pkgs.go}/bin/go $out/bin/go - ''; - }) - - ]); - - zomeCargoArtifacts = { system, craneLib ? (let - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ (import inputs.rust-overlay) ]; - }; - craneLib = (inputs.crane.mkLib pkgs).overrideToolchain - inputs.holonix.outputs.packages.${system}.rust; - in craneLib), debug ? false }: - let - src = - craneLib.cleanCargoSource (craneLib.path ./nix/reference-happ); - commonArgs = { - inherit src; - doCheck = false; - CARGO_BUILD_TARGET = "wasm32-unknown-unknown"; - }; - cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { - pname = "zome"; - version = "for-holochain-0.3.2"; - }); - - in cargoArtifacts; - - holochainCargoArtifacts = { system }: - let - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ (import inputs.rust-overlay) ]; - }; - craneLib = (inputs.crane.mkLib pkgs).overrideToolchain - inputs.holonix.outputs.packages.${system}.rust; - - buildInputs = holochainDeps { - inherit pkgs; - lib = pkgs.lib; - }; - cargoArtifacts = craneLib.buildDepsOnly { - inherit buildInputs; - src = craneLib.cleanCargoSource - (craneLib.path ./nix/reference-happ); - doCheck = false; - # RUSTFLAGS = - # "--remap-path-prefix ${cargoVendorDir}=/build/source/"; - # CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS = - # " -Clink-arg=-fuse-ld=mold"; - # CARGO_PROFILE = "release"; - CARGO_PROFILE = "release"; - pname = "sweettest"; - version = "for-holochain-0.3.2"; - }; - in cargoArtifacts; - - rustZome = { crateCargoToml, system, workspacePath - , cargoArtifacts ? null, matchingZomeHash ? null }: - let - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ (import inputs.rust-overlay) ]; - }; + flakeModules.builders = ./nix/builders-option.nix; + flakeModules.dependencies = ./nix/dependencies-option.nix; + }; + imports = [ + ./crates/scaffold_remote_zome/default.nix + ./crates/compare_dnas_integrity/default.nix + ./crates/zome_wasm_hash/default.nix + ./crates/sync_npm_git_dependencies_with_nix/default.nix + ./nix/builders-option.nix + ./nix/dependencies-option.nix + # inputs.holonix.inputs.flake-parts.flakeModules.flakeModules + ]; + + systems = builtins.attrNames inputs.holonix.devShells; + + perSystem = { inputs', self', config, pkgs, system, lib, ... }: rec { + dependencies.holochain.buildInputs = (with pkgs; [ perl openssl ]) + ++ (lib.optionals pkgs.stdenv.isLinux [ pkgs.pkg-config pkgs.go ]) + ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [ + pkgs.libiconv + + pkgs.darwin.apple_sdk.frameworks.AppKit + pkgs.darwin.apple_sdk.frameworks.WebKit + (pkgs.darwin.apple_sdk_11_0.stdenv.mkDerivation { + name = "go"; + nativeBuildInputs = with pkgs; [ makeBinaryWrapper go ]; + dontBuild = true; + dontUnpack = true; + installPhase = '' + makeWrapper ${pkgs.go}/bin/go $out/bin/go + ''; + }) + ]); + builders = { + rustZome = { crateCargoToml, workspacePath, cargoArtifacts ? null + , matchingZomeHash ? null, meta ? { } }: + let deterministicCraneLib = let rustToolchain = inputs.holonix.outputs.packages."x86_64-linux".rust; in (inputs.crane.mkLib pkgs).overrideToolchain rustToolchain; craneLib = (inputs.crane.mkLib pkgs).overrideToolchain - inputs.holonix.outputs.packages.${system}.rust; - zome-wasm-hash = - (outputs inputs).packages.${system}.zome-wasm-hash; + inputs'.holonix.packages.rust; + zome-wasm-hash = self'.packages.zome-wasm-hash; in pkgs.callPackage ./nix/zome.nix { inherit deterministicCraneLib craneLib crateCargoToml - cargoArtifacts workspacePath matchingZomeHash zome-wasm-hash; + cargoArtifacts workspacePath matchingZomeHash zome-wasm-hash + meta; }; - sweettest = { system, dna, workspacePath, crateCargoToml - , buildInputs ? [ ], nativeBuildInputs ? [ ], cargoArtifacts ? null - }: + sweettest = { dna, workspacePath, crateCargoToml, buildInputs ? [ ] + , nativeBuildInputs ? [ ], cargoArtifacts ? null }: let - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ (import inputs.rust-overlay) ]; - }; craneLib = (inputs.crane.mkLib pkgs).overrideToolchain - inputs.holonix.outputs.packages.${system}.rust; + inputs'.holonix.packages.rust; in pkgs.callPackage ./nix/sweettest.nix { inherit dna craneLib crateCargoToml cargoArtifacts workspacePath; - buildInputs = buildInputs ++ holochainDeps { - inherit pkgs; - lib = pkgs.lib; - }; + buildInputs = buildInputs + ++ self'.dependencies.holochain.buildInputs; }; - dna = { system, dnaManifest, zomes, matchingIntegrityDna ? null }: + dna = { dnaManifest, zomes, matchingIntegrityDna ? null, meta ? { } }: let - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ (import inputs.rust-overlay) ]; - }; - compare-dnas-integrity = - (outputs inputs).packages.${system}.compare-dnas-integrity; - holochain = inputs.holonix.outputs.packages.${system}.holochain; + compare-dnas-integrity = self'.packages.compare-dnas-integrity; + holochain = inputs'.holonix.packages.holochain; in pkgs.callPackage ./nix/dna.nix { inherit zomes holochain dnaManifest compare-dnas-integrity - matchingIntegrityDna; + matchingIntegrityDna meta; }; - happ = { system, happManifest, dnas }: - let - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ (import inputs.rust-overlay) ]; - }; - holochain = inputs.holonix.outputs.packages.${system}.holochain; - in pkgs.callPackage ./nix/happ.nix { - inherit dnas holochain happManifest; + happ = { happManifest, dnas, meta ? { } }: + pkgs.callPackage ./nix/happ.nix { + inherit dnas happManifest meta; + holochain = inputs'.holonix.packages.holochain; }; }; - }; - imports = [ - ./crates/scaffold_remote_zome/default.nix - ./crates/compare_dnas_integrity/default.nix - ./crates/zome_wasm_hash/default.nix - ./crates/sync_npm_git_dependencies_with_nix/default.nix - ]; - - systems = builtins.attrNames inputs.holonix.devShells; - - perSystem = { inputs', self', config, pkgs, system, lib, ... }: rec { devShells.default = pkgs.mkShell { inputsFrom = [ inputs'.holonix.devShells.default ]; packages = with pkgs; [ nodejs_20 # more packages go here - ] ++ flake.lib.holochainDeps { inherit pkgs lib; }; + ] ++ self'.dependencies.holochain.buildInputs; }; devShells.holochainDev = pkgs.mkShell { - buildInputs = flake.lib.holochainDeps { inherit pkgs lib; }; + buildInputs = self'.dependencies.holochain.buildInputs; + }; + + packages = { + zomeCargoArtifacts = let + craneLib = (inputs.crane.mkLib pkgs).overrideToolchain + inputs'.holonix.packages.rust; + src = + craneLib.cleanCargoSource (craneLib.path ./nix/reference-happ); + commonArgs = { + inherit src; + doCheck = false; + CARGO_BUILD_TARGET = "wasm32-unknown-unknown"; + }; + cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { + pname = "zome"; + version = "for-holochain-0.3.2"; + }); + + in cargoArtifacts; + + holochainCargoArtifacts = let + craneLib = (inputs.crane.mkLib pkgs).overrideToolchain + inputs'.holonix.packages.rust; + cargoArtifacts = craneLib.buildDepsOnly { + buildInputs = self'.dependencies.holochain.buildInputs; + src = + craneLib.cleanCargoSource (craneLib.path ./nix/reference-happ); + doCheck = false; + # RUSTFLAGS = + # "--remap-path-prefix ${cargoVendorDir}=/build/source/"; + # CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS = + # " -Clink-arg=-fuse-ld=mold"; + # CARGO_PROFILE = "release"; + CARGO_PROFILE = "release"; + pname = "sweettest"; + version = "for-holochain-0.3.2"; + }; + in cargoArtifacts; }; packages.synchronized-pnpm = pkgs.symlinkJoin { diff --git a/nix/builders-option.nix b/nix/builders-option.nix new file mode 100644 index 0000000..e73454a --- /dev/null +++ b/nix/builders-option.nix @@ -0,0 +1,15 @@ +{ lib, flake-parts-lib, ... }: +let + inherit (lib) mkOption types; + inherit (flake-parts-lib) mkTransposedPerSystemModule; +in mkTransposedPerSystemModule { + name = "builders"; + option = mkOption { + description = + "Nix function that receives arguments and returns a derivation"; + type = types.attrsOf (types.functionTo types.package); + + default = null; + }; + file = ./builders-option.nix; +} diff --git a/nix/dependencies-option.nix b/nix/dependencies-option.nix new file mode 100644 index 0000000..f1759f0 --- /dev/null +++ b/nix/dependencies-option.nix @@ -0,0 +1,30 @@ +{ lib, flake-parts-lib, ... }: +let + inherit (lib) mkOption types; + inherit (flake-parts-lib) mkTransposedPerSystemModule; +in mkTransposedPerSystemModule { + name = "dependencies"; + option = mkOption { + description = + "Attribute that contains the buildInputs and nativeBuildInputs packages that a certain class of derivation needs to be built"; + type = types.attrsOf (types.submodule { + options = { + buildInputs = mkOption { + type = types.listOf types.package; + description = + "The buildInputs that a certain class of derivation needs to be build"; + default = null; + }; + nativeBuildInputs = mkOption { + type = types.listOf types.package; + description = + "The nativeBuildInputs that a certain class of derivation needs to be build"; + default = null; + }; + }; + }); + + default = null; + }; + file = ./dependencies-option.nix; +} diff --git a/nix/dna.nix b/nix/dna.nix index 84a7ce9..fb82b81 100644 --- a/nix/dna.nix +++ b/nix/dna.nix @@ -1,8 +1,9 @@ # Build a DNA -{ dnaManifest, json2yaml, runCommandLocal, pkgs, writeText, holochain +{ dnaManifest, json2yaml, runCommandNoCC, runCommandLocal, pkgs, writeText +, holochain # If given a DNA, will check whether the DNA hashes for the given `matchingIntegrityDna` and the DNA to be built match # If they don't, it will print an error describing which zomes don't match -, matchingIntegrityDna ? null, compare-dnas-integrity, zomes ? { } }: +, matchingIntegrityDna ? null, compare-dnas-integrity, zomes ? { }, meta }: let zomeSrcs = builtins.attrValues zomes; @@ -21,9 +22,9 @@ let dnaManifestJson = writeText "dna.json" (builtins.toJSON manifest'); dnaManifestYaml = runCommandLocal "json-to-yaml" { } " ${json2yaml}/bin/json2yaml ${dnaManifestJson} $out\n"; # Recurse over the zomes, and add the correct bundled zome package by name - # Debug package - debug = runCommandLocal manifest.name { + # Debug package + debug = runCommandNoCC "${manifest.name}-debug" { srcs = builtins.map (zome: zome.meta.debug) zomeSrcs; } '' mkdir workdir @@ -75,8 +76,8 @@ let else release; -in runCommandLocal manifest.name { - meta = { inherit debug; }; +in runCommandNoCC manifest.name { + meta = meta // { inherit debug; }; outputs = [ "out" ]; } '' cp ${guardedRelease} $out diff --git a/nix/fixtures/app-repo/flake.lock b/nix/fixtures/app-repo/flake.lock index 8643d8d..a5f3070 100644 --- a/nix/fixtures/app-repo/flake.lock +++ b/nix/fixtures/app-repo/flake.lock @@ -388,7 +388,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-So32LgLinsHAfn7Qp493NvGgYFwSc1CYsW0zdLOWPcg=", + "narHash": "sha256-QAjU2tMsYxxEUbeuXFGbQhqRLlAUCzESoVdeQXztj54=", "path": "./../../..", "type": "path" }, @@ -422,7 +422,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-FxGqn2YpIZsHKlO23iQcVmqn/P7Cv7Vm2C9xwpn+HQM=", + "narHash": "sha256-82VUIDxgKo/8NrtyaaNEcGNz/tOjWGKXY/G2Sm6IA+Q=", "path": "./../../..", "type": "path" }, @@ -459,7 +459,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-JqnPk2dEoNN/Sqt51xVxrtQpforzogrV2lxd9siWB3I=", + "narHash": "sha256-ld4M0DGuqjnl2yK+zLPRHJtfzMBWBK75MDrqNY3Ye5U=", "path": "./../../..", "type": "path" }, @@ -1071,11 +1071,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -1123,11 +1123,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -1149,11 +1149,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -1175,11 +1175,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -1201,11 +1201,11 @@ "rust-overlay": "rust-overlay_5" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -1227,11 +1227,11 @@ "rust-overlay": "rust-overlay_6" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -1503,7 +1503,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-NyPhnanZ0OYnJ0PDZLaFp1t3jRVNlhJibV44HAoS8LY=", + "narHash": "sha256-cuRlpKdfXiu3UbI/Mue6YI7/X6o/GHPUYj7fiaU3Ywc=", "path": "./../module-repo", "type": "path" }, @@ -1794,11 +1794,11 @@ }, "pnpmnixpkgs": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { @@ -1810,11 +1810,11 @@ }, "pnpmnixpkgs_2": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { @@ -1826,11 +1826,11 @@ }, "pnpmnixpkgs_3": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { @@ -2149,7 +2149,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-zGAoDQsJWfYPuzwnFOJrrKl/qgcEpJa3ANgzZ7NDULU=", + "narHash": "sha256-+hr11lyOa+osP9fu9xQlsKPsmRklEuasxDsk/mvCrAQ=", "path": "./../service-repo", "type": "path" }, diff --git a/nix/fixtures/app-repo/happ/happ.nix b/nix/fixtures/app-repo/happ/happ.nix index 5cd259f..f7525ff 100644 --- a/nix/fixtures/app-repo/happ/happ.nix +++ b/nix/fixtures/app-repo/happ/happ.nix @@ -3,9 +3,8 @@ { perSystem = { inputs', config, pkgs, system, lib, self', options, ... }: { packages = { - my_happ = inputs.hc-infra.outputs.lib.happ { + my_happ = inputs.hc-infra.outputs.builders.${system}.happ { happManifest = ./happ.yaml; - inherit system; dnas = { my_dna = inputs'.service.packages.my_dna; }; }; }; diff --git a/nix/fixtures/module-repo/flake.lock b/nix/fixtures/module-repo/flake.lock index 9b14e37..014f285 100644 --- a/nix/fixtures/module-repo/flake.lock +++ b/nix/fixtures/module-repo/flake.lock @@ -169,7 +169,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-JqnPk2dEoNN/Sqt51xVxrtQpforzogrV2lxd9siWB3I=", + "narHash": "sha256-ld4M0DGuqjnl2yK+zLPRHJtfzMBWBK75MDrqNY3Ye5U=", "path": "./../../..", "type": "path" }, @@ -430,11 +430,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -456,11 +456,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -704,11 +704,11 @@ }, "pnpmnixpkgs": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { diff --git a/nix/fixtures/module-repo/flake.nix b/nix/fixtures/module-repo/flake.nix index 90a84d1..acab95b 100644 --- a/nix/fixtures/module-repo/flake.nix +++ b/nix/fixtures/module-repo/flake.nix @@ -12,7 +12,11 @@ outputs = inputs@{ ... }: inputs.holonix.inputs.flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ ./zomes/coordinator/zome.nix ./zomes/integrity/zome.nix ]; + imports = [ + ./zomes/coordinator/zome.nix + ./zomes/integrity/zome.nix + inputs.hc-infra.flakeModules.builders + ]; systems = builtins.attrNames inputs.holonix.devShells; perSystem = { inputs', config, pkgs, system, lib, self', ... }: { diff --git a/nix/fixtures/module-repo/zomes/coordinator/zome.nix b/nix/fixtures/module-repo/zomes/coordinator/zome.nix index ab5183b..2d22665 100644 --- a/nix/fixtures/module-repo/zomes/coordinator/zome.nix +++ b/nix/fixtures/module-repo/zomes/coordinator/zome.nix @@ -2,19 +2,16 @@ { perSystem = { inputs', self', system, ... }: { - packages.my_zome = inputs.hc-infra.outputs.lib.rustZome { + packages.my_zome = inputs.hc-infra.outputs.builders.${system}.rustZome { workspacePath = inputs.self.outPath; - inherit system; crateCargoToml = ./Cargo.toml; - cargoArtifacts = - inputs.hc-infra.lib.zomeCargoArtifacts { inherit system; }; + cargoArtifacts = inputs'.hc-infra.packages.zomeCargoArtifacts; # matchingZomeHash = inputs'.previousZomeVersion.packages.my_zome; }; - checks.my_zome = inputs.hc-infra.outputs.lib.sweettest { + checks.my_zome = inputs.hc-infra.outputs.builders.${system}.sweettest { workspacePath = inputs.self.outPath; - inherit system; - dna = inputs.hc-infra.outputs.lib.dna { + dna = inputs.hc-infra.outputs.builders.${system}.dna { dnaManifest = builtins.toFile "dna.yaml" '' --- manifest_version: "1" @@ -32,11 +29,9 @@ dylib: ~ ''; zomes = { my_zome = self'.packages.my_zome; }; - inherit system; }.meta.debug; crateCargoToml = ./Cargo.toml; - cargoArtifacts = - inputs.hc-infra.lib.holochainCargoArtifacts { inherit system; }; + cargoArtifacts = inputs'.hc-infra.packages.holochainCargoArtifacts; }; }; } diff --git a/nix/fixtures/module-repo/zomes/integrity/zome.nix b/nix/fixtures/module-repo/zomes/integrity/zome.nix index 3fb6870..974bf95 100644 --- a/nix/fixtures/module-repo/zomes/integrity/zome.nix +++ b/nix/fixtures/module-repo/zomes/integrity/zome.nix @@ -2,14 +2,12 @@ { perSystem = { inputs', self', system, ... }: { - packages.my_zome_integrity = inputs.hc-infra.outputs.lib.rustZome { - inherit system; - workspacePath = inputs.self.outPath; - crateCargoToml = ./Cargo.toml; - cargoArtifacts = - inputs.hc-infra.lib.zomeCargoArtifacts { inherit system; }; - # matchingZomeHash = inputs'.previousZomeVersion.packages.my_zome; - }; + packages.my_zome_integrity = + inputs.hc-infra.outputs.builders.${system}.rustZome { + workspacePath = inputs.self.outPath; + crateCargoToml = ./Cargo.toml; + cargoArtifacts = inputs'.hc-infra.packages.zomeCargoArtifacts; + # matchingZomeHash = inputs'.previousZomeVersion.packages.my_zome; + }; }; } - diff --git a/nix/fixtures/service-repo/dna/dna.nix b/nix/fixtures/service-repo/dna/dna.nix index d1f5317..00581fc 100644 --- a/nix/fixtures/service-repo/dna/dna.nix +++ b/nix/fixtures/service-repo/dna/dna.nix @@ -2,9 +2,8 @@ { perSystem = { inputs', config, pkgs, system, lib, self', options, ... }: { - packages.my_dna = inputs.hc-infra.outputs.lib.dna { + packages.my_dna = inputs.hc-infra.outputs.builders.${system}.dna { dnaManifest = ./dna.yaml; - inherit system; zomes = { my_zome = inputs'.module.packages.my_zome; my_zome_integrity = inputs'.module.packages.my_zome_integrity; diff --git a/nix/fixtures/service-repo/flake.lock b/nix/fixtures/service-repo/flake.lock index 2a51f7e..2bb4e77 100644 --- a/nix/fixtures/service-repo/flake.lock +++ b/nix/fixtures/service-repo/flake.lock @@ -318,7 +318,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-FxGqn2YpIZsHKlO23iQcVmqn/P7Cv7Vm2C9xwpn+HQM=", + "narHash": "sha256-82VUIDxgKo/8NrtyaaNEcGNz/tOjWGKXY/G2Sm6IA+Q=", "path": "./../../..", "type": "path" }, @@ -352,7 +352,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-JqnPk2dEoNN/Sqt51xVxrtQpforzogrV2lxd9siWB3I=", + "narHash": "sha256-ld4M0DGuqjnl2yK+zLPRHJtfzMBWBK75MDrqNY3Ye5U=", "path": "./../../..", "type": "path" }, @@ -856,11 +856,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -882,11 +882,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -908,11 +908,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -934,11 +934,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1725293701, - "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", + "lastModified": 1727194089, + "narHash": "sha256-+KmoByZhktCuJHNqYiZYedvSwhjgzLev0F0NcKNHgMY=", "owner": "holochain", "repo": "holonix", - "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", + "rev": "0aeff9984ab60ea70df3812be605a5f455f0489b", "type": "github" }, "original": { @@ -1201,7 +1201,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-NyPhnanZ0OYnJ0PDZLaFp1t3jRVNlhJibV44HAoS8LY=", + "narHash": "sha256-cuRlpKdfXiu3UbI/Mue6YI7/X6o/GHPUYj7fiaU3Ywc=", "path": "./../module-repo", "type": "path" }, @@ -1436,11 +1436,11 @@ }, "pnpmnixpkgs": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { @@ -1452,11 +1452,11 @@ }, "pnpmnixpkgs_2": { "locked": { - "lastModified": 1726838390, - "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { diff --git a/nix/happ.nix b/nix/happ.nix index 366b889..74eab7e 100644 --- a/nix/happ.nix +++ b/nix/happ.nix @@ -1,6 +1,6 @@ # Build a hApp -{ happManifest, holochain, writeText, json2yaml, callPackage, runCommandLocal -, dnas ? { } }: +{ happManifest, runCommandNoCC, holochain, writeText, json2yaml, callPackage +, runCommandLocal, dnas ? { }, meta }: let dnaSrcs = builtins.attrValues dnas; @@ -19,7 +19,7 @@ let happManifestYaml = runCommandLocal "json-to-yaml" { } " ${json2yaml}/bin/json2yaml ${happManifestJson} $out\n"; - debug = runCommandLocal "${manifest.name}-debug" { + debug = runCommandNoCC "${manifest.name}-debug" { srcs = builtins.map (dna: dna.meta.debug) dnaSrcs; } '' mkdir workdir @@ -36,8 +36,8 @@ let mv workdir/${manifest.name}.happ $out ''; -in runCommandLocal manifest.name { - meta = { inherit debug; }; +in runCommandNoCC manifest.name { + meta = meta // { inherit debug; }; srcs = dnaSrcs; } '' mkdir workdir diff --git a/nix/zome.nix b/nix/zome.nix index 2fd9ab8..9600c45 100644 --- a/nix/zome.nix +++ b/nix/zome.nix @@ -1,6 +1,6 @@ -{ lib, workspacePath, cargoArtifacts, runCommandLocal, binaryen +{ lib, workspacePath, cargoArtifacts, runCommandLocal, runCommandNoCC, binaryen , deterministicCraneLib, craneLib, crateCargoToml, matchingZomeHash ? null -, zome-wasm-hash }: +, zome-wasm-hash, meta }: let cargoToml = builtins.fromTOML (builtins.readFile crateCargoToml); @@ -101,7 +101,7 @@ let meta = { holochainPackageType = "zome"; }; } " cp ${wasm}/lib/${crate}.wasm $out \n"; - debug = runCommandLocal "${crate}-debug" { } '' + debug = runCommandNoCC "${crate}-debug" { } '' cp ${wasm}/lib/${crate}.wasm $out ''; @@ -127,13 +127,11 @@ let else release; -in runCommandLocal crate { - meta = { inherit debug; }; +in runCommandNoCC crate { + meta = meta // { inherit debug; }; outputs = [ "out" "hash" ]; buildInputs = [ zome-wasm-hash ]; } '' - cp ${guardedRelease} $out zome-wasm-hash $out > $hash - ''