summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorAna Hobden <operator@hoverbear.org>2021-04-25 21:19:49 -0700
committerAna Hobden <operator@hoverbear.org>2021-04-25 21:19:49 -0700
commitacfddd576e143669837b4cb79558ed047636f1fb (patch)
tree68ca466d39fad3c380c832b03b5877ae94968b2e /pkgs/stdenv
parent34463b2e3875fade97b61180b7676654ddad49fe (diff)
downloadnixpkgs-acfddd576e143669837b4cb79558ed047636f1fb.tar
nixpkgs-acfddd576e143669837b4cb79558ed047636f1fb.tar.gz
nixpkgs-acfddd576e143669837b4cb79558ed047636f1fb.tar.bz2
nixpkgs-acfddd576e143669837b4cb79558ed047636f1fb.tar.lz
nixpkgs-acfddd576e143669837b4cb79558ed047636f1fb.tar.xz
nixpkgs-acfddd576e143669837b4cb79558ed047636f1fb.tar.zst
nixpkgs-acfddd576e143669837b4cb79558ed047636f1fb.zip
stdenv: support mainProgram in meta
Support `mainProgram` as an attribute of `meta` for packages.

This is an attribute used by [`nix
run`](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-run.html#description)
to customize the main program of a package.

For example, `pkgs.neovim` provides a `/bin/nvim` executable which users
would (almost certainly) prefer `nix run` to execute instead of a
non-existing `/bin/neovim`.

Signed-off-by: Ana Hobden <operator@hoverbear.org>
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/check-meta.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix
index 7fa7f2305e8..ac62ad30829 100644
--- a/pkgs/stdenv/generic/check-meta.nix
+++ b/pkgs/stdenv/generic/check-meta.nix
@@ -203,6 +203,7 @@ let
   metaTypes = with lib.types; rec {
     # These keys are documented
     description = str;
+    mainProgram = str;
     longDescription = str;
     branch = str;
     homepage = either (listOf str) str;