-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ba6235
commit 605cfcb
Showing
3 changed files
with
96 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ inputs, self, ... }: | ||
|
||
{ | ||
perSystem = { inputs', pkgs, system, lib, ... }: rec { | ||
|
||
packages.scaffold-holochain-runtime = let | ||
craneLib = inputs.crane.lib.${system}; | ||
|
||
cratePath = ./.; | ||
|
||
cargoToml = | ||
builtins.fromTOML (builtins.readFile "${cratePath}/Cargo.toml"); | ||
crate = cargoToml.package.name; | ||
|
||
commonArgs = { | ||
src = craneLib.path ../../.; | ||
doCheck = false; | ||
buildInputs = inputs.hc-infra.outputs.lib.holochainAppDeps.buildInputs { | ||
inherit pkgs lib; | ||
} ++ self.lib.tauriAppDeps.buildInputs { inherit pkgs lib; }; | ||
nativeBuildInputs = | ||
(self.lib.tauriAppDeps.nativeBuildInputs { inherit pkgs lib; }) | ||
++ (inputs.hc-infra.outputs.lib.holochainAppDeps.nativeBuildInputs { | ||
inherit pkgs lib; | ||
}); | ||
}; | ||
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { | ||
version = "workspace"; | ||
pname = "workspace"; | ||
}); | ||
in craneLib.buildPackage (commonArgs // { | ||
pname = crate; | ||
version = cargoToml.package.version; | ||
inherit cargoArtifacts; | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ inputs, self, ... }: | ||
|
||
{ | ||
perSystem = { inputs', pkgs, system, lib, ... }: rec { | ||
packages.scaffold-tauri-app = let | ||
craneLib = inputs.crane.lib.${system}; | ||
|
||
cratePath = ./.; | ||
|
||
cargoToml = | ||
builtins.fromTOML (builtins.readFile "${cratePath}/Cargo.toml"); | ||
crate = cargoToml.package.name; | ||
|
||
commonArgs = { | ||
src = craneLib.path ../../.; | ||
doCheck = false; | ||
buildInputs = inputs.hc-infra.outputs.lib.holochainAppDeps.buildInputs { | ||
inherit pkgs lib; | ||
} ++ self.lib.tauriAppDeps.buildInputs { inherit pkgs lib; }; | ||
nativeBuildInputs = | ||
(self.lib.tauriAppDeps.nativeBuildInputs { inherit pkgs lib; }) | ||
++ (inputs.hc-infra.outputs.lib.holochainAppDeps.nativeBuildInputs { | ||
inherit pkgs lib; | ||
}); | ||
}; | ||
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { | ||
version = "workspace"; | ||
pname = "workspace"; | ||
}); | ||
in craneLib.buildPackage (commonArgs // { | ||
pname = crate; | ||
version = cargoToml.package.version; | ||
inherit cargoArtifacts; | ||
}); | ||
|
||
checks.scaffold-tauri-app = pkgs.runCommandLocal "test-scaffold-tauri-app" { | ||
buildInputs = | ||
[ inputs'.holochain.outputs.hc-scaffold packages.scaffold-tauri-app ]; | ||
} '' | ||
hc scaffold --template lit web-app forum | ||
cd forum | ||
nix flake update | ||
nix develop | ||
npm i | ||
scaffold-tauri-app forum | ||
nix flake update | ||
nix develop | ||
npm i | ||
npm run build:happ | ||
npm run tauri build | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters