Skip to content

Commit

Permalink
fix: Fix build to include tailwind config
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-andreas committed May 31, 2024
1 parent 86f2853 commit 2c9dc59
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@
pkgsRiscv.gcc
pkgsRiscv.binutils
riscv-toolchain
# Python
(python311.withPackages (p: with p; [ black httpx ipykernel ipython isort matplotlib numpy pytorch tqdm transformers ]))
];

commands = [
Expand All @@ -133,8 +131,14 @@
package = craneLib.buildTrunkPackage (commonArgs // {
pname = "web";
cargoArtifacts = crateClippy;
cargoExtraArgs = "--package=client";
trunkIndexPath = "web/index.html";
# note: we must override buildPhasecommand, otherwise it doesn't find tailwind.config.js because trunk build is execute at top level
# see here: https://github.com/ipetkov/crane/blob/480dff0be03dac0e51a8dfc26e882b0d123a450e/lib/buildTrunkPackage.nix
buildPhaseCommand = ''
cd web
trunk build --release
cd ..
'';
src = fs.toSource {
root = ./.;
fileset = fs.unions ([
Expand Down

0 comments on commit 2c9dc59

Please sign in to comment.