From 316e12a57992a63d5c81beecf02382f0a8cc5a3d Mon Sep 17 00:00:00 2001 From: "guillem.cordoba" Date: Mon, 23 Sep 2024 10:33:16 +0200 Subject: [PATCH] meta.debug again --- flake.nix | 104 ++++----- nix/dna.nix | 64 +++--- nix/fixtures/app-repo/flake.lock | 322 ++++++++++++++------------- nix/fixtures/module-repo/flake.lock | 33 +-- nix/fixtures/service-repo/flake.lock | 220 +++++++++--------- nix/happ.nix | 51 ++--- nix/zome.nix | 126 ++++++----- 7 files changed, 459 insertions(+), 461 deletions(-) diff --git a/flake.nix b/flake.nix index 845fddf..907c91a 100644 --- a/flake.nix +++ b/flake.nix @@ -39,48 +39,15 @@ rec { ]); - filterByHolochainPackageType = holochainPackageType: packages: - inputs.nixpkgs.lib.filterAttrs (key: value: - (builtins.hasAttr "meta" value) - && (builtins.hasAttr "holochainPackageType" value.meta) - && value.meta.holochainPackageType == holochainPackageType) - packages; - - filterZomes = filterByHolochainPackageType "zome"; - filterDnas = filterByHolochainPackageType "dna"; - filterHapps = filterByHolochainPackageType "happ"; - filterNpmPackages = filterByHolochainPackageType "npm"; - - holochainPkgs = { system }: - let - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ (import inputs.rust-overlay) ]; - }; - in pkgs; - - holochainRustToolchain = { system }: - let - pkgs = holochainPkgs { inherit system; }; - - rustToolchain = pkgs.rust-bin.stable."1.77.2".minimal.override { - # Set the build targets supported by the toolchain, - # wasm32-unknown-unknown is required for trunk. - targets = [ "wasm32-unknown-unknown" ]; - }; - in rustToolchain; + zomeCargoArtifacts = { system, craneLib ? (let - holochainCraneLib = { system }: - let - pkgs = holochainPkgs { inherit system; }; - rustToolchain = holochainRustToolchain { inherit system; }; - craneLib = - (inputs.crane.mkLib pkgs).overrideToolchain rustToolchain; - in craneLib; - - zomeCargoArtifacts = { system - , craneLib ? (holochainCraneLib { inherit system; }), debug ? false - }: + 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); @@ -98,8 +65,12 @@ rec { holochainCargoArtifacts = { system }: let - pkgs = holochainPkgs { inherit system; }; - craneLib = holochainCraneLib { inherit system; }; + 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; @@ -122,40 +93,37 @@ rec { in cargoArtifacts; rustZome = { crateCargoToml, system, workspacePath - , nonWasmCrates ? [ ], cargoArtifacts ? null - , matchingZomeHash ? null }: + , cargoArtifacts ? null, matchingZomeHash ? null }: let + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ (import inputs.rust-overlay) ]; + }; + deterministicCraneLib = let - pkgs = import inputs.nixpkgs { - system = "x86_64-linux"; - overlays = [ (import inputs.rust-overlay) ]; - }; - - rustToolchain = pkgs.rust-bin.stable."1.77.2".minimal.override { - # Set the build targets supported by the toolchain, - # wasm32-unknown-unknown is required for trunk. - targets = [ "wasm32-unknown-unknown" ]; - }; + rustToolchain = + inputs.holonix.outputs.packages."x86_64-linux".rust; in (inputs.crane.mkLib pkgs).overrideToolchain rustToolchain; - pkgs = holochainPkgs { inherit system; }; - craneLib = holochainCraneLib { inherit system; }; - + craneLib = (inputs.crane.mkLib pkgs).overrideToolchain + inputs.holonix.outputs.packages.${system}.rust; zome-wasm-hash = (outputs inputs).packages.${system}.zome-wasm-hash; in pkgs.callPackage ./nix/zome.nix { inherit deterministicCraneLib craneLib crateCargoToml - cargoArtifacts nonWasmCrates workspacePath matchingZomeHash - zome-wasm-hash; - referenceZomeCargoArtifacts = flake.lib.zomeCargoArtifacts; + cargoArtifacts workspacePath matchingZomeHash zome-wasm-hash; }; sweettest = { system, dna, workspacePath, crateCargoToml , buildInputs ? [ ], nativeBuildInputs ? [ ], cargoArtifacts ? null }: let - pkgs = holochainPkgs { inherit system; }; - craneLib = holochainCraneLib { inherit system; }; + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ (import inputs.rust-overlay) ]; + }; + craneLib = (inputs.crane.mkLib pkgs).overrideToolchain + inputs.holonix.outputs.packages.${system}.rust; in pkgs.callPackage ./nix/sweettest.nix { inherit dna craneLib crateCargoToml cargoArtifacts workspacePath; buildInputs = buildInputs ++ holochainDeps { @@ -165,7 +133,10 @@ rec { }; dna = { system, dnaManifest, zomes, matchingIntegrityDna ? null }: let - pkgs = holochainPkgs { inherit system; }; + 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; @@ -176,7 +147,10 @@ rec { }; happ = { system, happManifest, dnas }: let - pkgs = holochainPkgs { inherit system; }; + 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; diff --git a/nix/dna.nix b/nix/dna.nix index e6168e6..84a7ce9 100644 --- a/nix/dna.nix +++ b/nix/dna.nix @@ -21,51 +21,34 @@ 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 - release = runCommandLocal manifest.name { - srcs = builtins.map (zome: zome.meta.release) zomeSrcs; - meta = { holochainPackageType = "dna"; }; - } '' - mkdir workdir - cp ${dnaManifestYaml} workdir/dna.yaml + # Debug package + debug = runCommandLocal manifest.name { + srcs = builtins.map (zome: zome.meta.debug) zomeSrcs; + } '' + mkdir workdir + cp ${dnaManifestYaml} workdir/dna.yaml + ${ builtins.toString (builtins.map (zome: '' - cp ${zomes.${zome.name}.meta.release} ./workdir/${zome.name}.wasm + cp ${zomes.${zome.name}.meta.debug} ./workdir/${zome.name}.wasm '') manifest'.integrity.zomes) } ${ builtins.toString (builtins.map (zome: '' - cp ${zomes.${zome.name}.meta.release} ./workdir/${zome.name}.wasm + cp ${zomes.${zome.name}.meta.debug} ./workdir/${zome.name}.wasm '') manifest'.coordinator.zomes) } - + ${holochain}/bin/hc dna pack workdir mv workdir/${manifest.name}.dna $out ''; - guardedRelease = if matchingIntegrityDna != null then - runCommandLocal "check-match-dna-${manifest.name}-integrity" { - srcs = [ release matchingIntegrityDna.meta.release ]; - buildInputs = [ compare-dnas-integrity ]; - } '' - ${compare-dnas-integrity}/bin/compare-dnas-integrity ${matchingIntegrityDna.meta.release} ${release} - cp ${release} $out - '' - else - release; + release = runCommandLocal "${manifest.name}-release" { srcs = zomeSrcs; } '' + mkdir workdir + cp ${dnaManifestYaml} workdir/dna.yaml - # Debug package - debug = runCommandLocal manifest.name { - srcs = zomeSrcs; - meta = { - release = guardedRelease; - holochainPackageType = "dna"; - }; - } '' - mkdir workdir - cp ${dnaManifestYaml} workdir/dna.yaml - ${ builtins.toString (builtins.map (zome: '' cp ${zomes.${zome.name}} ./workdir/${zome.name}.wasm @@ -76,8 +59,25 @@ let cp ${zomes.${zome.name}} ./workdir/${zome.name}.wasm '') manifest'.coordinator.zomes) } - + ${holochain}/bin/hc dna pack workdir mv workdir/${manifest.name}.dna $out ''; -in debug + + guardedRelease = if matchingIntegrityDna != null then + runCommandLocal "check-match-dna-${manifest.name}-integrity" { + srcs = [ release matchingIntegrityDna ]; + buildInputs = [ compare-dnas-integrity ]; + } '' + ${compare-dnas-integrity}/bin/compare-dnas-integrity ${matchingIntegrityDna} ${release} + cp ${release} $out + '' + else + release; + +in runCommandLocal manifest.name { + 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 cd90cd0..ec994c9 100644 --- a/nix/fixtures/app-repo/flake.lock +++ b/nix/fixtures/app-repo/flake.lock @@ -1,19 +1,12 @@ { "nodes": { "crane": { - "inputs": { - "nixpkgs": [ - "hc-infra", - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -46,18 +39,12 @@ } }, "crane_2": { - "inputs": { - "nixpkgs": [ - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -67,20 +54,12 @@ } }, "crane_3": { - "inputs": { - "nixpkgs": [ - "service", - "hc-infra", - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -90,19 +69,12 @@ } }, "crane_4": { - "inputs": { - "nixpkgs": [ - "service", - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -112,21 +84,12 @@ } }, "crane_5": { - "inputs": { - "nixpkgs": [ - "service", - "module", - "hc-infra", - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -136,20 +99,12 @@ } }, "crane_6": { - "inputs": { - "nixpkgs": [ - "service", - "module", - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -236,11 +191,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -272,11 +227,11 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -290,11 +245,11 @@ "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -308,11 +263,11 @@ "nixpkgs-lib": "nixpkgs-lib_4" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -326,11 +281,11 @@ "nixpkgs-lib": "nixpkgs-lib_5" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -344,11 +299,11 @@ "nixpkgs-lib": "nixpkgs-lib_6" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -424,6 +379,7 @@ "holonix", "nixpkgs" ], + "pnpmnixpkgs": "pnpmnixpkgs", "rust-overlay": [ "hc-infra", "holonix", @@ -432,7 +388,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-A8xjiS0uEHKOXZti0HMektLC3veAAlCsFRbZ0Vfsq8s=", + "narHash": "sha256-IbFRR8hA0ARvzlSkQdFCAzI6kQFbZ/rQvMs7B64F9x4=", "path": "./../../..", "type": "path" }, @@ -456,6 +412,7 @@ "holonix", "nixpkgs" ], + "pnpmnixpkgs": "pnpmnixpkgs_2", "rust-overlay": [ "service", "hc-infra", @@ -465,7 +422,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-4zKDty4KLm/wIVEK+Adhx97uQJuweDrQ9sXe/Wd/9r8=", + "narHash": "sha256-1ZH7ZjjEcQ8IGWNcY/FnExFhP7zruMAbzgxJ/cI/H80=", "path": "./../../..", "type": "path" }, @@ -491,6 +448,7 @@ "holonix", "nixpkgs" ], + "pnpmnixpkgs": "pnpmnixpkgs_3", "rust-overlay": [ "service", "module", @@ -501,7 +459,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-M5JSSHYfat7zQbqhnmfYS9zIo4OwruRDpSZ5Z17mWhc=", + "narHash": "sha256-r5Tpt72DkGoR9CEOKlj2Usqlp+RrQjlbcQP1c604fmc=", "path": "./../../..", "type": "path" }, @@ -539,11 +497,11 @@ ] }, "locked": { - "lastModified": 1725274427, - "narHash": "sha256-JSPsz9hN9TrlAd7Pg7u7tTz2uFLyHR8JCvC0gXGwBVo=", + "lastModified": 1725282556, + "narHash": "sha256-B0DFFCS3UWDpHutqJpQz/IUmnTjITnJbVEZTKD321pw=", "owner": "holochain-open-dev", "repo": "infrastructure", - "rev": "4e152d1d93cc1c41985bd7dc79088a47360d6a09", + "rev": "83ee6861e965d15211145484c44ce22bb12fd071", "type": "github" }, "original": { @@ -578,11 +536,11 @@ ] }, "locked": { - "lastModified": 1725274427, - "narHash": "sha256-JSPsz9hN9TrlAd7Pg7u7tTz2uFLyHR8JCvC0gXGwBVo=", + "lastModified": 1725282556, + "narHash": "sha256-B0DFFCS3UWDpHutqJpQz/IUmnTjITnJbVEZTKD321pw=", "owner": "holochain-open-dev", "repo": "infrastructure", - "rev": "4e152d1d93cc1c41985bd7dc79088a47360d6a09", + "rev": "83ee6861e965d15211145484c44ce22bb12fd071", "type": "github" }, "original": { @@ -1113,11 +1071,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -1165,11 +1123,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -1191,11 +1149,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -1217,11 +1175,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -1243,11 +1201,11 @@ "rust-overlay": "rust-overlay_5" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -1269,11 +1227,11 @@ "rust-overlay": "rust-overlay_6" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -1545,7 +1503,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-lb+DYtxxTjgR1n2M1VP7XEIzvXC0d5YgWc+5djN4jbI=", + "narHash": "sha256-tNwS14nEIYN9C20NKsxgFlcePQx9BH9zYsqRJTa2e7E=", "path": "./../module-repo", "type": "path" }, @@ -1572,14 +1530,14 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_10": { @@ -1596,62 +1554,62 @@ }, "nixpkgs-lib_2": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_3": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_4": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_5": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_6": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_7": { @@ -1834,6 +1792,54 @@ "type": "github" } }, + "pnpmnixpkgs": { + "locked": { + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "pnpmnixpkgs_2": { + "locked": { + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "pnpmnixpkgs_3": { + "locked": { + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, "profiles": { "inputs": { "hc-infra": "hc-infra_4", @@ -1847,11 +1853,11 @@ ] }, "locked": { - "lastModified": 1725281282, - "narHash": "sha256-H1iovFsGcg1Ytu6lOmbnw6fy4uiUOfNWRMdYyS1SxCs=", + "lastModified": 1725282695, + "narHash": "sha256-ZtozbZ0D6Z0vUlz7FzBkuNf5/7JE1syZ0CuRi/75bas=", "owner": "holochain-open-dev", "repo": "profiles", - "rev": "a014dc21425ddaf244de3bff932982a44b37ce1f", + "rev": "6000dc6c04194429f2768517670366c411c4a03a", "type": "github" }, "original": { @@ -1873,11 +1879,11 @@ ] }, "locked": { - "lastModified": 1725281282, - "narHash": "sha256-H1iovFsGcg1Ytu6lOmbnw6fy4uiUOfNWRMdYyS1SxCs=", + "lastModified": 1725282695, + "narHash": "sha256-ZtozbZ0D6Z0vUlz7FzBkuNf5/7JE1syZ0CuRi/75bas=", "owner": "holochain-open-dev", "repo": "profiles", - "rev": "a014dc21425ddaf244de3bff932982a44b37ce1f", + "rev": "6000dc6c04194429f2768517670366c411c4a03a", "type": "github" }, "original": { @@ -1907,11 +1913,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -1951,11 +1957,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -1974,11 +1980,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -1996,11 +2002,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -2020,11 +2026,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -2043,11 +2049,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -2143,7 +2149,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-ljZ2Aflookv/cjDs+fWcBnwD4CpWvXPxVJj+OAE21O8=", + "narHash": "sha256-Z+2oiCXwNne+yrFC/CPSC93ZeeoBWikLzb6cr+2hBAc=", "path": "./../service-repo", "type": "path" }, diff --git a/nix/fixtures/module-repo/flake.lock b/nix/fixtures/module-repo/flake.lock index d428ae8..c5e6548 100644 --- a/nix/fixtures/module-repo/flake.lock +++ b/nix/fixtures/module-repo/flake.lock @@ -155,7 +155,12 @@ "crane" ], "holonix": "holonix", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "hc-infra", + "holonix", + "nixpkgs" + ], + "pnpmnixpkgs": "pnpmnixpkgs", "rust-overlay": [ "hc-infra", "holonix", @@ -164,7 +169,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-OLS0zBIQAbOOdawCV5pu/j4LwRqJ2EFkVJ0Q93Y2l5E=", + "narHash": "sha256-r5Tpt72DkGoR9CEOKlj2Usqlp+RrQjlbcQP1c604fmc=", "path": "./../../..", "type": "path" }, @@ -447,7 +452,7 @@ "hc-scaffold": "hc-scaffold_2", "holochain": "holochain_2", "lair-keystore": "lair-keystore_2", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -473,7 +478,7 @@ "hc-scaffold": "hc-scaffold_3", "holochain": "holochain_3", "lair-keystore": "lair-keystore_3", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "rust-overlay": "rust-overlay_3" }, "locked": { @@ -499,7 +504,7 @@ "hc-scaffold": "hc-scaffold_4", "holochain": "holochain_4", "lair-keystore": "lair-keystore_4", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "rust-overlay": "rust-overlay_4" }, "locked": { @@ -651,16 +656,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1725930920, - "narHash": "sha256-RVhD9hnlTT2nJzPHlAqrWqCkA7T6CYrP41IoVRkciZM=", + "lastModified": 1717179513, + "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "44a71ff39c182edaf25a7ace5c9454e7cba2c658", + "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.05", + "ref": "24.05", "repo": "nixpkgs", "type": "github" } @@ -697,18 +702,18 @@ "type": "github" } }, - "nixpkgs_5": { + "pnpmnixpkgs": { "locked": { - "lastModified": 1717179513, - "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", "type": "github" }, "original": { "owner": "nixos", - "ref": "24.05", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } diff --git a/nix/fixtures/service-repo/flake.lock b/nix/fixtures/service-repo/flake.lock index 1cdac68..6906ecb 100644 --- a/nix/fixtures/service-repo/flake.lock +++ b/nix/fixtures/service-repo/flake.lock @@ -1,19 +1,12 @@ { "nodes": { "crane": { - "inputs": { - "nixpkgs": [ - "hc-infra", - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -23,18 +16,12 @@ } }, "crane_2": { - "inputs": { - "nixpkgs": [ - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -44,20 +31,12 @@ } }, "crane_3": { - "inputs": { - "nixpkgs": [ - "module", - "hc-infra", - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -67,19 +46,12 @@ } }, "crane_4": { - "inputs": { - "nixpkgs": [ - "module", - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724537630, - "narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=", + "lastModified": 1725125250, + "narHash": "sha256-CB20rDD5eHikF6mMTTJdwPP1qvyoiyyw1RDUzwIaIF8=", "owner": "ipetkov", "repo": "crane", - "rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0", + "rev": "96fd12c7100e9e05fa1a0a5bd108525600ce282f", "type": "github" }, "original": { @@ -185,11 +157,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -203,11 +175,11 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -221,11 +193,11 @@ "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -239,11 +211,11 @@ "nixpkgs-lib": "nixpkgs-lib_4" }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -337,6 +309,7 @@ "holonix", "nixpkgs" ], + "pnpmnixpkgs": "pnpmnixpkgs", "rust-overlay": [ "hc-infra", "holonix", @@ -345,7 +318,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-4zKDty4KLm/wIVEK+Adhx97uQJuweDrQ9sXe/Wd/9r8=", + "narHash": "sha256-1ZH7ZjjEcQ8IGWNcY/FnExFhP7zruMAbzgxJ/cI/H80=", "path": "./../../..", "type": "path" }, @@ -369,6 +342,7 @@ "holonix", "nixpkgs" ], + "pnpmnixpkgs": "pnpmnixpkgs_2", "rust-overlay": [ "module", "hc-infra", @@ -378,7 +352,7 @@ }, "locked": { "lastModified": 0, - "narHash": "sha256-M5JSSHYfat7zQbqhnmfYS9zIo4OwruRDpSZ5Z17mWhc=", + "narHash": "sha256-r5Tpt72DkGoR9CEOKlj2Usqlp+RrQjlbcQP1c604fmc=", "path": "./../../..", "type": "path" }, @@ -413,11 +387,11 @@ ] }, "locked": { - "lastModified": 1725274427, - "narHash": "sha256-JSPsz9hN9TrlAd7Pg7u7tTz2uFLyHR8JCvC0gXGwBVo=", + "lastModified": 1725282556, + "narHash": "sha256-B0DFFCS3UWDpHutqJpQz/IUmnTjITnJbVEZTKD321pw=", "owner": "holochain-open-dev", "repo": "infrastructure", - "rev": "4e152d1d93cc1c41985bd7dc79088a47360d6a09", + "rev": "83ee6861e965d15211145484c44ce22bb12fd071", "type": "github" }, "original": { @@ -449,11 +423,11 @@ ] }, "locked": { - "lastModified": 1725274427, - "narHash": "sha256-JSPsz9hN9TrlAd7Pg7u7tTz2uFLyHR8JCvC0gXGwBVo=", + "lastModified": 1725282556, + "narHash": "sha256-B0DFFCS3UWDpHutqJpQz/IUmnTjITnJbVEZTKD321pw=", "owner": "holochain-open-dev", "repo": "infrastructure", - "rev": "4e152d1d93cc1c41985bd7dc79088a47360d6a09", + "rev": "83ee6861e965d15211145484c44ce22bb12fd071", "type": "github" }, "original": { @@ -882,11 +856,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -908,11 +882,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -934,11 +908,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -960,11 +934,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1724935136, - "narHash": "sha256-TAxGCtBJXv/B6gdBD/TNisuRAs7tC9ati89DZr73ddo=", + "lastModified": 1725293701, + "narHash": "sha256-dwb1tzr7kO8u5LllGqJiIaKe2btsKaMHX1gecgtwruM=", "owner": "holochain", "repo": "holonix", - "rev": "f1a543d4188adbe6ff1cd9229120d5fe3cb96103", + "rev": "fb9e3c067052cf628d1b22a1802f016eaf1d3e3e", "type": "github" }, "original": { @@ -1227,7 +1201,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-lb+DYtxxTjgR1n2M1VP7XEIzvXC0d5YgWc+5djN4jbI=", + "narHash": "sha256-tNwS14nEIYN9C20NKsxgFlcePQx9BH9zYsqRJTa2e7E=", "path": "./../module-repo", "type": "path" }, @@ -1254,50 +1228,50 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_2": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_3": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_4": { "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-lib_5": { @@ -1460,6 +1434,38 @@ "type": "github" } }, + "pnpmnixpkgs": { + "locked": { + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "pnpmnixpkgs_2": { + "locked": { + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, "profiles": { "inputs": { "hc-infra": "hc-infra_3", @@ -1472,11 +1478,11 @@ ] }, "locked": { - "lastModified": 1725281282, - "narHash": "sha256-H1iovFsGcg1Ytu6lOmbnw6fy4uiUOfNWRMdYyS1SxCs=", + "lastModified": 1725282695, + "narHash": "sha256-ZtozbZ0D6Z0vUlz7FzBkuNf5/7JE1syZ0CuRi/75bas=", "owner": "holochain-open-dev", "repo": "profiles", - "rev": "a014dc21425ddaf244de3bff932982a44b37ce1f", + "rev": "6000dc6c04194429f2768517670366c411c4a03a", "type": "github" }, "original": { @@ -1497,11 +1503,11 @@ ] }, "locked": { - "lastModified": 1725281282, - "narHash": "sha256-H1iovFsGcg1Ytu6lOmbnw6fy4uiUOfNWRMdYyS1SxCs=", + "lastModified": 1725282695, + "narHash": "sha256-ZtozbZ0D6Z0vUlz7FzBkuNf5/7JE1syZ0CuRi/75bas=", "owner": "holochain-open-dev", "repo": "profiles", - "rev": "a014dc21425ddaf244de3bff932982a44b37ce1f", + "rev": "6000dc6c04194429f2768517670366c411c4a03a", "type": "github" }, "original": { @@ -1532,11 +1538,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -1553,11 +1559,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -1576,11 +1582,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { @@ -1598,11 +1604,11 @@ ] }, "locked": { - "lastModified": 1724898214, - "narHash": "sha256-4yMO9+Lsr3zqTf4clAGGag/bfNTmc/ITOXbJQcOEok4=", + "lastModified": 1725243956, + "narHash": "sha256-0A5ZP8uDCyBdYUzayZfy6JFdTefP79oZVAjyqA/yuSI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0bc2c784e3a6ce30a2ab1b9f47325ccbed13039f", + "rev": "a10c8092d5f82622be79ed4dd12289f72011f850", "type": "github" }, "original": { diff --git a/nix/happ.nix b/nix/happ.nix index 02a9c78..366b889 100644 --- a/nix/happ.nix +++ b/nix/happ.nix @@ -1,6 +1,6 @@ # Build a hApp -{ happManifest, holochain, writeText, json2yaml, callPackage, runCommandNoCC -, runCommandLocal, dnas ? { } }: +{ happManifest, holochain, writeText, json2yaml, callPackage, runCommandLocal +, dnas ? { } }: let dnaSrcs = builtins.attrValues dnas; @@ -19,30 +19,8 @@ let happManifestYaml = runCommandLocal "json-to-yaml" { } " ${json2yaml}/bin/json2yaml ${happManifestJson} $out\n"; - release = runCommandLocal manifest.name { - srcs = builtins.map (dna: dna.meta.release) dnaSrcs; - meta = { holochainPackageType = "happ"; }; - } '' - mkdir workdir - - cp ${happManifestYaml} workdir/happ.yaml - - ${ - builtins.toString (builtins.map (role: '' - cp ${dnas.${role.name}.meta.release} ./workdir/${role.name}.dna - '') manifest'.roles) - } - - ${holochain}/bin/hc app pack workdir - mv workdir/${manifest.name}.happ $out - ''; - - debug = runCommandLocal manifest.name { - srcs = dnaSrcs; - meta = { - inherit release; - holochainPackageType = "happ"; - }; + debug = runCommandLocal "${manifest.name}-debug" { + srcs = builtins.map (dna: dna.meta.debug) dnaSrcs; } '' mkdir workdir @@ -50,11 +28,28 @@ let ${ builtins.toString (builtins.map (role: '' - cp ${dnas.${role.name}} ./workdir/${role.name}.dna + cp ${dnas.${role.name}.meta.debug} ./workdir/${role.name}.dna '') manifest.roles) } ${holochain}/bin/hc app pack workdir mv workdir/${manifest.name}.happ $out ''; -in debug + +in runCommandLocal manifest.name { + meta = { inherit debug; }; + srcs = dnaSrcs; +} '' + mkdir workdir + + cp ${happManifestYaml} workdir/happ.yaml + + ${ + builtins.toString (builtins.map (role: '' + cp ${dnas.${role.name}} ./workdir/${role.name}.dna + '') manifest'.roles) + } + + ${holochain}/bin/hc app pack workdir + mv workdir/${manifest.name}.happ $out +'' diff --git a/nix/zome.nix b/nix/zome.nix index 5f41529..2fd9ab8 100644 --- a/nix/zome.nix +++ b/nix/zome.nix @@ -1,18 +1,6 @@ -{ lib - , workspacePath - , referenceZomeCargoArtifacts - , cargoArtifacts - , pkgs - , runCommandLocal - , runCommandNoCC - , binaryen - , deterministicCraneLib - , craneLib - , crateCargoToml - , nonWasmCrates - , matchingZomeHash ? null - , zome-wasm-hash -}: +{ lib, workspacePath, cargoArtifacts, runCommandLocal, binaryen +, deterministicCraneLib, craneLib, crateCargoToml, matchingZomeHash ? null +, zome-wasm-hash }: let cargoToml = builtins.fromTOML (builtins.readFile crateCargoToml); @@ -20,6 +8,29 @@ let src = craneLib.cleanCargoSource (craneLib.path workspacePath); + listCratesPathsFromWorkspace = src: + let + + allFiles = lib.filesystem.listFilesRecursive src; + allCargoTomlsPaths = + builtins.filter (path: lib.strings.hasSuffix "/Cargo.toml" path) + allFiles; + allCratesPaths = + builtins.map (path: builtins.dirOf path) allCargoTomlsPaths; + in allCratesPaths; + + listCratesNamesFromWorskspace = src: + let + allCratesPaths = listCratesPathsFromWorkspace src; + cratesCargoToml = builtins.map + (path: builtins.fromTOML (builtins.readFile (path + "/Cargo.toml"))) + allCratesPaths; + cratesWithoutWorkspace = + builtins.filter (toml: builtins.hasAttr "package" toml) cratesCargoToml; + cratesNames = + builtins.map (toml: toml.package.name) cratesWithoutWorkspace; + in cratesNames; + listBinaryCratesFromWorkspace = src: let isCrateZome = path: @@ -32,12 +43,7 @@ let (builtins.toString (path + "/src/bin"))); in hasSrc && !hasMain && !hasBinDir; - allFiles = lib.filesystem.listFilesRecursive src; - allCargoTomlsPaths = - builtins.filter (path: lib.strings.hasSuffix "/Cargo.toml" path) - allFiles; - allCratesPaths = - builtins.map (path: builtins.dirOf path) allCargoTomlsPaths; + allCratesPaths = listCratesPathsFromWorkspace src; binaryCratesPaths = builtins.filter (cratePath: !(isCrateZome cratePath)) allCratesPaths; binaryCratesCargoToml = builtins.map @@ -54,11 +60,18 @@ let excludedCrates = builtins.toString (builtins.map (c: " --exclude ${c}") nonWasmCrates); + allCratesNames = listCratesNamesFromWorskspace src; + + workspaceName = if builtins.length allCratesNames > 0 then + builtins.elemAt allCratesNames 0 + else + ""; + commonArgs = { inherit src; doCheck = false; CARGO_BUILD_TARGET = "wasm32-unknown-unknown"; - pname = "workspace"; + pname = "${workspaceName}-workspace"; version = cargoToml.package.version; cargoBuildCommand = "cargo build --release --locked --workspace ${excludedCrates}"; @@ -80,13 +93,7 @@ let (buildPackageCommonArgs // { cargoArtifacts = zomeCargoArtifacts; }); deterministicWasm = let - zca = referenceZomeCargoArtifacts { - system = pkgs.system; - craneLib = deterministicCraneLib; - }; - cargoArtifacts = - (deterministicCraneLib.callPackage ./buildDepsOnlyWithArtifacts.nix { }) - (commonArgs // { cargoArtifacts = zca; }); + cargoArtifacts = deterministicCraneLib.buildDepsOnly (commonArgs // { }); wasm = deterministicCraneLib.buildPackage (buildPackageCommonArgs // { inherit cargoArtifacts; }); @@ -94,34 +101,39 @@ let meta = { holochainPackageType = "zome"; }; } " cp ${wasm}/lib/${crate}.wasm $out \n"; - release = runCommandLocal crate { - meta = { holochainPackageType = "zome"; }; - buildInputs = [ binaryen ]; - } '' - wasm-opt --strip-debug -Oz -o $out ${deterministicWasm} + debug = runCommandLocal "${crate}-debug" { } '' + cp ${wasm}/lib/${crate}.wasm $out ''; - guardedRelease = if matchingZomeHash != null then runCommandLocal "check-zome-${crate}-hash" { - srcs = [ release matchingZomeHash.meta.release ]; - buildInputs = [ zome-wasm-hash ]; - } '' - ORIGINAL_HASH=$(zome-wasm-hash ${matchingZomeHash.meta.release}) - NEW_HASH=$(zome-wasm-hash ${release}) - - if [[ "$ORIGINAL_HASH" != "$NEW_HASH" ]]; then - echo "The hash for the new ${crate} zome does not match the hash of the original zome" - exit 1 - fi - - cp ${release} $out - '' else release; - - debug = runCommandLocal "${crate}-debug" { - meta = { - holochainPackageType = "zome"; - release = guardedRelease; - }; - } '' - cp ${wasm}/lib/${crate}.wasm $out + release = runCommandLocal crate { buildInputs = [ binaryen ]; } '' + wasm-opt --strip-debug -Oz -o $out ${deterministicWasm} ''; -in debug + + guardedRelease = if matchingZomeHash != null then + runCommandLocal "check-zome-${crate}-hash" { + srcs = [ release matchingZomeHash.meta.release ]; + buildInputs = [ zome-wasm-hash ]; + } '' + ORIGINAL_HASH=$(zome-wasm-hash ${matchingZomeHash.meta.release}) + NEW_HASH=$(zome-wasm-hash ${release}) + + if [[ "$ORIGINAL_HASH" != "$NEW_HASH" ]]; then + echo "The hash for the new ${crate} zome does not match the hash of the original zome" + exit 1 + fi + + cp ${release} $out + '' + else + release; + +in runCommandLocal crate { + meta = { inherit debug; }; + outputs = [ "out" "hash" ]; + buildInputs = [ zome-wasm-hash ]; +} '' + + cp ${guardedRelease} $out + zome-wasm-hash $out > $hash + +''