Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Mar 5, 2024
1 parent 4e5a9ee commit 99edc66
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions nix/dna.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ in
hc dna pack workdir
mv workdir/${manifest.name}.dna $out
'';
meta = {
holochainPackageType = "dna";
};
}
3 changes: 3 additions & 0 deletions nix/happ.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ in
hc app pack workdir
mv workdir/${manifest.name}.happ $out
'';
meta = {
holochainPackageType = "happ";
};
}
2 changes: 1 addition & 1 deletion nix/zome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ in
cp ${wasm}/lib/${crate}.wasm $out
'';
meta = {
holochainType = "zome";
holochainPackageType = "zome";
};
}

0 comments on commit 99edc66

Please sign in to comment.