Skip to content

Commit 7d9ea3f

Browse files
committed
Add package for building entire workspace
1 parent df6d1a1 commit 7d9ea3f

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

flake.nix

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@
6969
in
7070
rec {
7171
# `nix build`
72+
defaultPackage = packages.workspace;
73+
74+
packages.workspace = naersk-lib.buildPackage rec {
75+
root = ./.;
76+
cargoBuildOptions = x: x ++ [
77+
"--target" "wasm32-unknown-unknown"
78+
];
79+
cargoTestOptions = x: x ++ [
80+
"--target" "wasm32-unknown-unknown"
81+
];
82+
compressTarget = false;
83+
copyBins = false;
84+
copyTarget = true;
85+
};
86+
7287
packages.icfs = naersk-lib.buildPackage rec {
7388
pname = "icfs";
7489
root = ./.;
@@ -101,8 +116,6 @@
101116
copyTarget = true;
102117
};
103118

104-
defaultPackage = packages.icfs;
105-
106119
# `nix develop`
107120
devShell = pkgs.mkShell {
108121
buildInputs = [

0 commit comments

Comments
 (0)