File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 568
568
wrapProgram $out/bin/dbmate-tool \
569
569
--prefix PATH : ${ pkgs . lib . makeBinPath [ pkgs . overmind pkgs . dbmate pkgs . nix pkgs . jq pkgs . yq ] }
570
570
'' ;
571
+ show-commands = pkgs . runCommand "show-commands" {
572
+ nativeBuildInputs = [ pkgs . makeWrapper ] ;
573
+ buildInputs = [ pkgs . nushell ] ;
574
+ } ''
575
+ mkdir -p $out/bin
576
+ cat > $out/bin/show-commands << 'EOF'
577
+ #!${ pkgs . nushell } /bin/nu
578
+ let json_output = (nix flake show --json --quiet --all-systems | from json)
579
+ let apps = ($json_output | get apps.${ system } )
580
+ $apps | transpose name info | select name | each { |it| echo $"Run this app with: nix run .#($it.name)" }
581
+ EOF
582
+ chmod +x $out/bin/show-commands
583
+ wrapProgram $out/bin/show-commands \
584
+ --prefix PATH : ${ pkgs . nushell } /bin
585
+ '' ;
571
586
update-readme = pkgs . runCommand "update-readme" {
572
587
nativeBuildInputs = [ pkgs . makeWrapper ] ;
573
588
buildInputs = [ pkgs . nushell ] ;
You can’t perform that action at this time.
0 commit comments