# Confused about wayland package

**URL:** https://discourse.nixos.org/t/confused-about-wayland-package/69653
**Category:** Help
**Created:** [September 22, 2025, 8:51am UTC](https://discourse.nixos.org/t/confused-about-wayland-package/69653 "2025-09-22T08:51:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![muoscar](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@muoscar](https://discourse.nixos.org/u/muoscar)
#### Post date: [September 22, 2025, 8:51am UTC](https://discourse.nixos.org/t/confused-about-wayland-package/69653/1 "2025-09-22T08:51:11Z")

</div>

I have a devShell where I develop a wayland client. I noticed that the following works.

```nix
{
  inputs = {
    utils.url = "github:numtide/flake-utils";
  };
  outputs =
    {self, nixpkgs, utils}:
    utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
      in
      {
        devShells.default = pkgs.clangStdenv.mkDerivation {
          name = "myDevShell";
          nativeBuildInputs = with pkgs; [
            wayland
          ];
        };
      }
    );
}

```

But I can’t actually find wayland on [NixOS Search](http://search.nixos.org/packages), how come? How am I meant to discover `pkgs.wayland` in the first place? How do I inspect its outputs/what is contained in the derivation?

Sorry if this is a naive question 😛

---

<div class="post-metadata">

### Author: ![TLATER](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tlater/32/4257_2.png) [@TLATER](https://discourse.nixos.org/u/TLATER)
#### Post date: [September 22, 2025, 10:40am UTC](https://discourse.nixos.org/t/confused-about-wayland-package/69653/2 "2025-09-22T10:40:02Z")

</div>

The search [hides aliases](https://github.com/NixOS/nixos-search/issues/345), so some packages are just invisible. Might be the case for this one, I’m a bit too lazy to dig through the aliases files to figure that out for sure.

> [@muoscar](#):
>
> How am I meant to discover `pkgs.wayland` in the first place?

`nix search` or `nix-env -Q` don’t have this issue.

> [@muoscar](#):
>
> How do I inspect its outputs/what is contained in the derivation?

You can always `nix build` the attribute and look in the `result` directory.

> [@muoscar](#):
>
> `nativeBuildInputs`

Use `packages` for `mkShell`.

---

<div class="post-metadata">

### Author: ![muoscar](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@muoscar](https://discourse.nixos.org/u/muoscar)
#### Post date: [September 22, 2025, 12:10pm UTC](https://discourse.nixos.org/t/confused-about-wayland-package/69653/3 "2025-09-22T12:10:09Z")

</div>

Thanks, this was very helpful!

I built the derivation and notices that one of the result folders contained a bunch of man-pages. These man pages are not available to me in the shell, how could I go about finding out where they end up/why they are not in the path my man command uses? Can I find the source for the wayland derivation somehow?

Here is the result with man-pages:

```shell
result-man/
└── share
    └── man
        └── man3
            ├── wl_argument.3.gz
            ├── wl_array.3.gz
            ├── wl_client.3.gz
            ├── wl_cursor.3.gz
            ├── wl_cursor_image.3.gz
            ├── wl_cursor_theme.3.gz
            ├── wl_display.3.gz
            ├── wl_event_loop.3.gz
            ├── wl_event_queue.3.gz
            ├── wl_event_source.3.gz
            ├── wl_global.3.gz
            ├── wl_interface.3.gz
            ├── wl_list.3.gz
            ├── wl_listener.3.gz
            ├── wl_message.3.gz
            ├── wl_object.3.gz
            ├── wl_protocol_logger.3.gz
            ├── wl_protocol_logger_message.3.gz
            ├── wl_proxy.3.gz
            ├── wl_resource.3.gz
            ├── wl_resource_iterator_context.3.gz
            ├── wl_shm_buffer.3.gz
            ├── wl_shm_pool.3.gz
            ├── wl_shm_sigbus_data.3.gz
            ├── wl_signal.3.gz
            └── wl_socket.3.gz

```

As for using packages, I was using `pkgs.clangStdenv.mkDerivation` which didn’t seem to use the packages attribute. But I did switch to

```nix
        devShells.default = (pkgs.mkShell.override { stdenv = pkgs.clangStdenv; }) {
          packages = with pkgs; [wayland];
        };

```

and that worked nicely, thanks 🙂

---

<div class="post-metadata">

### Author: ![waffle8946](https://discourse.nixos.org/user_avatar/discourse.nixos.org/waffle8946/32/27221_2.png) [@waffle8946](https://discourse.nixos.org/u/waffle8946)
#### Post date: [September 22, 2025, 12:42pm UTC](https://discourse.nixos.org/t/confused-about-wayland-package/69653/4 "2025-09-22T12:42:13Z")

</div>

You can use `nix shell nixpkgs#wayland` and the manpages are available in the shell (but I do recognize how clunky that is).

This seems to be a longstanding nix issue:

> <https://github.com/NixOS/nix/issues/9550>
>
> \*\*Describe the bug\*\*
> 
> When I start a nix-shell with a single-output package, \`…man \<whatever\>\` will give me a man page from that package. When I start a nix-shell with a multiple-output package, \`man \<whatever\>\` will tell me “No manual entry for &lt;whatever&gt;”.
> 
> \*\*Steps To Reproduce\*\*
> 
> 1. Run
> \`\`\`bash
> nix-shell --pure --packages man less hello --run "man hello"
> \`\`\`
> That command will work because \`hello\` only has one output.
> 2. Run
> \`\`\`bash
> nix-shell --pure --packages man less bash.man --run "man bash"
> \`\`\`
> That command won’t work because \`bash\` has more than one output.
> 
> \*\*Expected behavior\*\*
> 
> \`man \<whatever\>\` should work regardless of whether or not the package has multiple outputs. As long as the user told nix-shell to use an output that contain man pages, they should be added to \`man\`’s search path.
> 
> \*\*\`nix-env --version\` output\*\*
> 
> nix-env (Nix) 2.18.1
> 
> \*\*Additional context\*\*
> 
> I made a script that works around the problem:
> 
> \`\`\`bash
> \#!/usr/bin/env nix-shell
> \#! nix-shell -i bash -p jq
> \# 🅭🄍1.0 This file is dedicated to the public domain using the CC0 1.0 Universal
> \# Public Domain Dedication \<https://creativecommons.org/publicdomain/zero/1.0/\>.
> set -e
> 
> function generate\_manpath
> {
> for attribute\_name in "$@"
> do
> # Thanks, tobiasBora, olmokramer and cole-h:
> # • \<https://discourse.nixos.org/t/eval-nix-expression-from-the-command-line/8993/5?u=jasonyundt\>
> # • \<https://discourse.nixos.org/t/eval-nix-expression-from-the-command-line/8993/6?u=jasonyundt\>
> # • \<https://discourse.nixos.org/t/eval-nix-expression-from-the-command-line/8993/8?u=jasonyundt\>
> nix-instantiate --eval -E "\\"\\${(import \<nixpkgs\> {}).$attribute\_name}/share/man\\"" | jq --join-output
> echo -n :
> done
> }
> 
> MANPATH="$(generate\_manpath "$@")" nix-shell --packages "$@"
> \`\`\`
> Save it as \`shell-with-man-pages.sh\`, and then run something like this:
> 
> \`\`\`bash
> ./shell-with-man-pages.sh subversionClient subversionClient.man
> \`\`\`
> 
> \*\*Priorities\*\*
> 
> Add :+1: to \[issues you find important\](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).

They mention a workaround that I personally also find clunky.
