This makes all devshells compatible with lib.getExe, nix runand nix bundle by setting meta.mainProgram and creating an executable under $out/bin/${meta.mainProgram}
Also remove the now unnecessary flakeApp workaround from the docs and replace it with updated instructions.
My main motivation behind this is to create portable executable devshells via nix bundle.
For example, to bundle the devShell of devshell itself into a static executable:
This makes all devshells compatible with
lib.getExe
,nix run
andnix bundle
by settingmeta.mainProgram
and creating an executable under$out/bin/${meta.mainProgram}
Also remove the now unnecessary flakeApp workaround from the docs and replace it with updated instructions.
My main motivation behind this is to create portable executable devshells via
nix bundle
. For example, to bundle the devShell of devshell itself into a static executable: