Skip to content

Commit

Permalink
feat: add launcher for aarch64-darwin platform
Browse files Browse the repository at this point in the history
  • Loading branch information
jost-s committed May 22, 2024
1 parent 7e8b7b8 commit b9c84fc
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
result
36 changes: 27 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 46 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
url = "github:holochain/lair/lair_keystore-v0.4.4";
flake = false;
};

# Holochain Launcher CLI
launcher-src = {
url = "github:holochain/launcher/holochain-0.3";
flake = false;
};
};

# outputs that this flake should produce
Expand Down Expand Up @@ -78,8 +84,8 @@
};
# additional packages needed for build
buildInputs = [
pkgs.perl
pkgs.go
pkgs.perl
];
# do not check built package as it either builds successfully or not
doCheck = false;
Expand Down Expand Up @@ -115,20 +121,53 @@
# do not check built package as it either builds successfully or not
doCheck = false;
};

# define how to build Holochain Launcher binary
launcher =
let
# Crane filters out all non-cargo related files. Define include filter with files needed for build.
includeFilesFilter = path: type: (craneLib.filterCargoSources path type);
in
craneLib.buildPackage {
pname = "hc-launch";
version = "workspace";
# only build hc-launch command
cargoExtraArgs = "--bin hc-launch";
# Use Launcher sources as defined in input dependencies and include only those files defined in the
# filter previously.
src = pkgs.lib.cleanSourceWith {
src = launcher-src;
filter = includeFilesFilter;
};
# additional packages needed for build
# perl needed for openssl on all platforms
buildInputs = [
pkgs.go
pkgs.perl
]
++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [
# additional packages needed for darwin platforms
pkgs.darwin.apple_sdk.frameworks.AppKit
pkgs.darwin.apple_sdk.frameworks.WebKit
]);
# do not check built package as it either builds successfully or not
doCheck = false;
};
in
{
packages = {
inherit holochain;
inherit lair-keystore;
inherit rust;
# inherit holochain;
# inherit lair-keystore;
# inherit rust;
inherit launcher;
};

devShells = {
default = pkgs.mkShell {
packages = [
holochain
lair-keystore
rust
# holochain
# lair-keystore
# rust
];
};
};
Expand Down

0 comments on commit b9c84fc

Please sign in to comment.