Skip to content

Commit

Permalink
Updated hc-infra
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Sep 26, 2024
1 parent 3eec8da commit ba0d96b
Show file tree
Hide file tree
Showing 6 changed files with 249 additions and 307 deletions.
21 changes: 5 additions & 16 deletions crates/hc-pilot/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ inputs, self, ... }:

{
perSystem = { inputs', pkgs, system, lib, ... }: {
perSystem = { inputs', self', pkgs, system, lib, ... }: {
packages.hc-pilot = let
craneLib = inputs.crane.mkLib pkgs;

Expand All @@ -15,17 +15,9 @@
src =
(self.lib.cleanTauriSource { inherit lib; }) (craneLib.path ../../.);
doCheck = false;
buildInputs = inputs.hc-infra.outputs.lib.holochainDeps {
inherit lib;
pkgs = inputs'.webkitgtknixpkgs.legacyPackages;
} ++ self.lib.tauriAppDeps.buildInputs {
inherit lib;
pkgs = inputs'.webkitgtknixpkgs.legacyPackages;
};
nativeBuildInputs = (self.lib.tauriAppDeps.nativeBuildInputs {
inherit lib;
pkgs = inputs'.webkitgtknixpkgs.legacyPackages;
});

buildInputs = self'.dependencies.tauriHapp.buildInputs;
nativeBuildInputs = self'.dependencies.tauriHapp.nativeBuildInputs;

# TODO: remove this if possible
# Without this build fails on MacOs
Expand All @@ -46,10 +38,7 @@
version = cargoToml.package.version;
# inherit cargoArtifacts;
});
in pkgs.runCommandLocal "wrap-${crate}" {
buildInputs = [ pkgs.makeWrapper ];

} ''
in pkgs.runCommandNoCC crate { buildInputs = [ pkgs.makeWrapper ]; } ''
mkdir $out
mkdir $out/bin
# Because we create this ourself, by creating a wrapper
Expand Down
9 changes: 3 additions & 6 deletions crates/scaffold-holochain-runtime/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ inputs, self, ... }:

{
perSystem = { inputs', pkgs, system, lib, ... }: {
perSystem = { inputs', self', pkgs, system, lib, ... }: {

packages.scaffold-holochain-runtime = let
craneLib = inputs.crane.mkLib pkgs;
Expand All @@ -16,11 +16,8 @@
src = (self.lib.cleanScaffoldingSource { inherit lib; })
(craneLib.path ../../.);
doCheck = false;
buildInputs =
inputs.hc-infra.outputs.lib.holochainDeps { inherit pkgs lib; }
++ self.lib.tauriAppDeps.buildInputs { inherit pkgs lib; };
nativeBuildInputs =
(self.lib.tauriAppDeps.nativeBuildInputs { inherit pkgs lib; });
buildInputs = self'.dependencies.tauriHapp.buildInputs;
nativeBuildInputs = self'.dependencies.tauriHapp.nativeBuildInputs;
cargoExtraArgs = "--locked --package scaffold-holochain-runtime";
};
in craneLib.buildPackage (commonArgs // {
Expand Down
7 changes: 3 additions & 4 deletions crates/scaffold-tauri-happ/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ inputs, self, ... }:

{
perSystem = { inputs', pkgs, system, lib, ... }: {
perSystem = { inputs', self', pkgs, system, lib, ... }: {

packages.scaffold-tauri-happ = let
craneLib = inputs.crane.mkLib pkgs;
Expand All @@ -16,9 +16,8 @@
src = (self.lib.cleanScaffoldingSource { inherit lib; })
(craneLib.path ../../.);
doCheck = false;
buildInputs =
inputs.hc-infra.outputs.lib.holochainDeps { inherit pkgs lib; }
++ self.lib.tauriAppDeps.buildInputs { inherit pkgs lib; };
buildInputs = self'.dependencies.tauriHapp.buildInputs;
nativeBuildInputs = self'.dependencies.tauriHapp.nativeBuildInputs;
cargoExtraArgs = "--locked --package scaffold-tauri-happ";
};
in craneLib.buildPackage (commonArgs // {
Expand Down
Loading

0 comments on commit ba0d96b

Please sign in to comment.