Skip to content

Commit

Permalink
Try importing a whole sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Dec 20, 2024
1 parent f1311a0 commit 02c8674
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@

# Crane doesn't know which version to select from a workspace, so we tell it where to look
crateInfo = craneLib.crateNameFromCargoToml { cargoToml = inputs.holochain + "/crates/holochain/Cargo.toml"; };

apple_sdk = if system == "x86_64-darwin" then pkgs.apple-sdk_10_15 else pkgs.apple-sdk_11;
in
craneLib.buildPackage {
pname = "holochain";
Expand All @@ -100,27 +102,10 @@
# additional packages needed for build
buildInputs = [
pkgs.perl
] ++ (pkgs.lib.optionals pkgs.stdenv.isLinux
[
pkgs.go
]) ++ pkgs.lib.optionals pkgs.stdenv.isDarwin
[
(if pkgs.system == "x86_64-darwin" then
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
'';
}
else pkgs.go)
];
pkgs.go
] ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [
apple_sdk
]);

# Build Holochain, CLI and local services (bootstrap + signal server) binaries.
# Pass extra arguments like feature flags to build command.
Expand Down

0 comments on commit 02c8674

Please sign in to comment.