-
Notifications
You must be signed in to change notification settings - Fork 1
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
607c4c2
commit a1f87c4
Showing
2 changed files
with
36 additions
and
29 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,33 @@ | ||
{ inputs, self, ... }: | ||
|
||
{ | ||
perSystem = { inputs', pkgs, self', lib, ... }: { | ||
|
||
packages.scaffold-remote-zome = let | ||
craneLib = inputs.crane.mkLib pkgs; | ||
|
||
cratePath = ./.; | ||
|
||
cargoToml = | ||
builtins.fromTOML (builtins.readFile "${cratePath}/Cargo.toml"); | ||
crate = cargoToml.package.name; | ||
|
||
commonArgs = { | ||
src = craneLib.cleanCargoSource (craneLib.path ../../.); | ||
doCheck = false; | ||
buildInputs = | ||
self.lib.holochainAppDeps.buildInputs { inherit pkgs lib; }; | ||
nativeBuildInputs = | ||
self.lib.holochainAppDeps.nativeBuildInputs { inherit pkgs lib; }; | ||
}; | ||
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { | ||
pname = "workspace"; | ||
version = "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 |
---|---|---|
|
@@ -196,9 +196,11 @@ | |
}; | ||
}; | ||
|
||
imports = [ ./crates/scaffold_remote_zome/default.nix ]; | ||
|
||
systems = builtins.attrNames inputs.holochain.devShells; | ||
perSystem = { inputs', config, pkgs, system, lib, ... }: rec { | ||
|
||
perSystem = { inputs', config, pkgs, system, lib, ... }: rec { | ||
devShells.default = pkgs.mkShell { | ||
inputsFrom = [ inputs'.holochain.devShells.holonix ]; | ||
packages = with pkgs; | ||
|
@@ -312,34 +314,6 @@ | |
inherit cargoArtifacts; | ||
}); | ||
|
||
packages.scaffold-remote-zome = let | ||
craneLib = inputs.crane.mkLib pkgs; | ||
|
||
cratePath = ./crates/scaffold_remote_zome; | ||
|
||
cargoToml = | ||
builtins.fromTOML (builtins.readFile "${cratePath}/Cargo.toml"); | ||
crate = cargoToml.package.name; | ||
|
||
commonArgs = { | ||
src = craneLib.cleanCargoSource (craneLib.path ./.); | ||
doCheck = false; | ||
buildInputs = | ||
flake.lib.holochainAppDeps.buildInputs { inherit pkgs lib; }; | ||
nativeBuildInputs = flake.lib.holochainAppDeps.nativeBuildInputs { | ||
inherit pkgs lib; | ||
}; | ||
}; | ||
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { | ||
pname = "workspace"; | ||
version = "workspace"; | ||
}); | ||
in craneLib.buildPackage (commonArgs // { | ||
pname = crate; | ||
version = cargoToml.package.version; | ||
inherit cargoArtifacts; | ||
}); | ||
|
||
packages.pnpm = pkgs.writeShellScriptBin "pnpm" '' | ||
#!${pkgs.bash}/bin/bash | ||
exec ${pkgs.nodejs_20}/bin/node ${pkgs.nodejs_20}/bin/corepack [email protected] "$@" | ||
|