diff --git a/flake.nix b/flake.nix index f674095..30a6236 100644 --- a/flake.nix +++ b/flake.nix @@ -26,7 +26,13 @@ } { flake = { - lib = { + lib = rec { + filterByHolochainPackageType = holochainPackageType: packages: inputs.nixpkgs.lib.filterAttrs (key: value: value.meta.holochainPackageType == holochainPackageType) packages; + + filterZomes = filterByHolochainPackageType "zome"; + filterDnas = filterByHolochainPackageType "dna"; + filterHapps = filterByHolochainPackageType "happ"; + rustZome = { cratePath, holochain, workspacePath, optimizeWasm ? true, excludedCrates ? [] }: let system = holochain.devShells.holonix.system; diff --git a/nix/dna.nix b/nix/dna.nix index 4ddc4dd..f27178d 100644 --- a/nix/dna.nix +++ b/nix/dna.nix @@ -45,4 +45,7 @@ in hc dna pack workdir mv workdir/${manifest.name}.dna $out ''; + meta = { + holochainPackageType = "dna"; + }; } diff --git a/nix/happ.nix b/nix/happ.nix index 218e009..c758203 100644 --- a/nix/happ.nix +++ b/nix/happ.nix @@ -42,4 +42,7 @@ in hc app pack workdir mv workdir/${manifest.name}.happ $out ''; + meta = { + holochainPackageType = "happ"; + }; } diff --git a/nix/zome.nix b/nix/zome.nix index 8cadcd1..65229c1 100644 --- a/nix/zome.nix +++ b/nix/zome.nix @@ -50,6 +50,6 @@ in cp ${wasm}/lib/${crate}.wasm $out ''; meta = { - holochainType = "zome"; + holochainPackageType = "zome"; }; }