summary refs log tree commit diff
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2023-08-04 18:36:08 +0300
committerArtturin <Artturin@artturin.com>2023-08-04 20:31:16 +0300
commit61c0ecea5b98249bc234466bc0e0ae778af72a45 (patch)
treee61418f8861628d0b47e94f90d00923f1c29933f
parent5b3975cc66cefd3c199505c7a5780c5bbba95bce (diff)
downloadnixpkgs-61c0ecea5b98249bc234466bc0e0ae778af72a45.tar
nixpkgs-61c0ecea5b98249bc234466bc0e0ae778af72a45.tar.gz
nixpkgs-61c0ecea5b98249bc234466bc0e0ae778af72a45.tar.bz2
nixpkgs-61c0ecea5b98249bc234466bc0e0ae778af72a45.tar.lz
nixpkgs-61c0ecea5b98249bc234466bc0e0ae778af72a45.tar.xz
nixpkgs-61c0ecea5b98249bc234466bc0e0ae778af72a45.tar.zst
nixpkgs-61c0ecea5b98249bc234466bc0e0ae778af72a45.zip
treewide: update mainProgram docs
-rw-r--r--doc/stdenv/meta.chapter.md2
-rw-r--r--lib/meta.nix5
-rw-r--r--pkgs/development/node-packages/main-programs.nix5
3 files changed, 5 insertions, 7 deletions
diff --git a/doc/stdenv/meta.chapter.md b/doc/stdenv/meta.chapter.md
index e626e794299..f6da0bb84be 100644
--- a/doc/stdenv/meta.chapter.md
+++ b/doc/stdenv/meta.chapter.md
@@ -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}
 
diff --git a/lib/meta.nix b/lib/meta.nix
index d32a37fe61d..21404b3a2bf 100644
--- a/lib/meta.nix
+++ b/lib/meta.nix
@@ -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
diff --git a/pkgs/development/node-packages/main-programs.nix b/pkgs/development/node-packages/main-programs.nix
index c327b3b9a5b..2329de51149 100644
--- a/pkgs/development/node-packages/main-programs.nix
+++ b/pkgs/development/node-packages/main-programs.nix
@@ -1,5 +1,4 @@
-# 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";