Platonic-Systems / mission-control

A `flake-parts` module for your Nix devshell scripts
https://community.flake.parts/mission-control
MIT License
79 stars 11 forks source link

Add `flakeApp` option #24

Closed srid closed 1 year ago

srid commented 1 year ago

This,

   fmt = { 
     exec = "${lib.getExe pkgs.nixpkgs-fmt} ./*.nix"; 
     flakeApp = true;
   }; 

... would wire a flake app of the same name, so that nix run .#fmt will work (in addition to nix develop -c , fmt).

Useful in https://github.com/srid/nixos-config for running activation without entering the devShell. Useful for users who do not use direnv, as well.

cc @marijanp

srid commented 1 year ago

flakeApp cannot be true by default, because it does not make sense for many scripts (ghcid, for instance, can only be run in a devshell).

srid commented 1 year ago

Closing in favour of #23