nix-community / nix-bundle

Bundle Nix derivations to run anywhere!
MIT License
651 stars 46 forks source link

`nix bundle` tries to bundle from `apps` which doesn't have `drv`'s #95

Open bachrc opened 1 year ago

bachrc commented 1 year ago

When trying to bundle an app in my flake (nix run runs pretty great), I have this error message:

➜ git:(main) nix bundle error: provided installable is not a derivation and not coercible to an outPath

I actually just tried it with this template: https://github.com/Xe/templates/blob/main/go-web-server/flake.nix

Artturin commented 3 days ago

The bundler wants a drv but nix bundle by default provides from apps which doesn't have drv

https://github.com/NixOS/nix/blob/806a91f7bf00b8fd99e7b472e890615230f674ba/src/nix/bundle.cc#L56

You can work around the issue by doing nix bundle ".#packages.x86_64-linux.default"