numtide / devshell

Per project developer environments
https://numtide.github.io/devshell/
MIT License
1.23k stars 88 forks source link

init compatibility with: nix bundle, nix run, lib.getExe #306

Closed DavHau closed 5 months ago

DavHau commented 5 months ago

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:

nix bundle --bundler github:DavHau/nix-portable github:numtide/devshell#devShells.x86_64-linux.default