Commit 61c0ecea authored by Artturin's avatar Artturin
Browse files

treewide: update mainProgram docs

parent 5b3975cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ A list of the maintainers of this Nix expression. Maintainers are defined in [`n

### `mainProgram` {#var-meta-mainProgram}

The name of the main binary for the package. This affects the binary `nix run` executes and falls back to the name of the package. Example: `"rg"`
The name of the main binary for the package. This affects the binary `nix run` executes. Example: `"rg"`

### `priority` {#var-meta-priority}

+2 −3
Original line number Diff line number Diff line
@@ -132,10 +132,9 @@ rec {
        { shortName = licstr; }
      );

  /* Get the path to the main program of a derivation with either
     meta.mainProgram or pname or name
  /* Get the path to the main program of a package based on meta.mainProgram

     Type: getExe :: derivation -> string
     Type: getExe :: package -> string

     Example:
       getExe pkgs.hello
+2 −3
Original line number Diff line number Diff line
# Use this file to add `meta.mainProgram` to packages in `nodePackages`, that don't provide an
# executable that matches that packages name, so that they'll work with `nix run`.
# Use this file to add `meta.mainProgram` to packages in `nodePackages`.
{
  # Packages that provide multiple executables where one is clearly the `mainProgram`.
  "@antfu/ni" = "ni";
@@ -11,7 +10,7 @@
  vue-cli = "vue";
  "@withgraphite/graphite-cli" = "gt";

  # Packages that provide a single executable whose name differs from the package's `name`.
  # Packages that provide a single executable.
  "@angular/cli" = "ng";
  "@antora/cli" = "antora";
  "@astrojs/language-server" = "astro-ls";