too lazy to think of a message, so enjoy this pointless text. Good luck future me...
All checks were successful
Test action / Print hello world (push) Successful in 8m1s
All checks were successful
Test action / Print hello world (push) Successful in 8m1s
This commit is contained in:
parent
e7a6d9e6b8
commit
9692689418
2 changed files with 18 additions and 4 deletions
|
|
@ -11,8 +11,9 @@
|
|||
|
||||
src = ../..;
|
||||
bunNix = ../../bun.nix;
|
||||
dontFixup = true;
|
||||
|
||||
nativeBuildInputs = with pkgs; [ bun git ];
|
||||
nativeBuildInputs = with pkgs; [ bun git makeWrapper ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
|
@ -22,8 +23,6 @@
|
|||
|
||||
bun run build --bun
|
||||
bun build --compile --target=bun-linux-x64 --minify --outfile result ./.output/server/index.mjs
|
||||
|
||||
echo "build completed with: $?"
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
|
@ -32,8 +31,12 @@
|
|||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
mv result $out/bin/${pname}
|
||||
install -p result $out/bin/${pname}
|
||||
cp -r ./.output/* $out
|
||||
|
||||
# makeWrapper ${lib.getExe pkgs.bun} $out/bin/${pname} \
|
||||
# --chdir $out \
|
||||
# --append-flags "run start"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
|
|
|||
11
temp.md
Executable file
11
temp.md
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
does anyone here have experience with packaging and running a js app derivation using bun? I believe I have all the individual pieces that I need to get this working, but I am struggling to tie them together, and knowing me it is just a super small thing that I'm missing.
|
||||
|
||||
What I have so far
|
||||
- solid start application
|
||||
- build into a single file executable with `bun build --compile` (ran both locally and in the derivation's buildPhase)
|
||||
- a flake with a package which is a bun2nix mkBunDerivation
|
||||
- a machine that runs the package using `nix run url-to-flake`
|
||||
|
||||
When I build and run the executable locally everything works as intended.
|
||||
However when I use the package from the flake only bun's help text get printed.
|
||||
Does anyone have any suggestions on what either the cause could be or how to debug this (I am very new to packaging in nix)
|
||||
Loading…
Add table
Add a link
Reference in a new issue