# Quite confused with some "un-searchable?" nix pakages

**URL:** https://discourse.nixos.org/t/quite-confused-with-some-un-searchable-nix-pakages/50782
**Category:** Uncategorized
**Created:** [August 18, 2024, 8:20am UTC](https://discourse.nixos.org/t/quite-confused-with-some-un-searchable-nix-pakages/50782 "2024-08-18T08:20:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![meow-king](https://discourse.nixos.org/user_avatar/discourse.nixos.org/meow-king/32/16828_2.png) [@meow-king](https://discourse.nixos.org/u/meow-king)
#### Post date: [August 18, 2024, 8:20am UTC](https://discourse.nixos.org/t/quite-confused-with-some-un-searchable-nix-pakages/50782/1 "2024-08-18T08:20:25Z")

</div>

```auto
✦2 ❯ nix repl
Welcome to Nix 2.18.5. Type :? for help.

nix-repl> :load <nixpkgs>      
Added 22339 variables.

nix-repl> pam  
«derivation /nix/store/dsmlq8izczg8aab9ryxh6m5m5lrf6wmx-linux-pam-1.6.1.drv»

nix-repl> wayland
«derivation /nix/store/lcg2mcbsqg55h1vqsh6wd00imq4zpfsp-wayland-1.23.0.drv»

```

I cannot find out the exact package named `wayland` on [nix-search-packages website](https://search.nixos.org/packages). And also, how can I efficiently search `pam` on the website? Since when I search `pam` on the website, I don’t see the exact package named `pam` and `linux-pam` seems to be placed at the tailing position.

---

<div class="post-metadata">

### Author: ![eljamm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/eljamm/32/16466_2.png) [@eljamm](https://discourse.nixos.org/u/eljamm)
#### Post date: [August 18, 2024, 10:01am UTC](https://discourse.nixos.org/t/quite-confused-with-some-un-searchable-nix-pakages/50782/2 "2024-08-18T10:01:20Z")

</div>

I think you can’t find `pam` in the search because its [pname](https://github.com/NixOS/nixpkgs/blob/e81df3732910da53944f98646367cf55886416e3/pkgs/os-specific/linux/pam/default.nix#L8) is `linux-pam`, so that’s what it shows up as.

For `wayland`, I’m not really sure, but this might be an error. You might want to open an issue in the [nixos-search](https://github.com/NixOS/nixos-search/issues) repo about this.

In any case, you can find which file the packages originate from using `meta.position`:

```auto
nix-repl> pam.meta.position
"/nix/store/m4wnqg94mzbb3mcraq5sjrrgfjdwbs95-source/pkgs/os-specific/linux/pam/default.nix:59"

nix-repl> wayland.meta.position
"/nix/store/m4wnqg94mzbb3mcraq5sjrrgfjdwbs95-source/pkgs/development/libraries/wayland/default.nix:118"

```

**Edit:** Looking at how these packages are defined in `all-packages.nix`, missing `pam` might be related to [`go_1_22` not found · Issue #781 · NixOS/nixos-search · GitHub](https://github.com/NixOS/nixos-search/issues/781) since it appears to be an alias to `linux-pam` and `openpam`

```auto
  pam = if stdenv.isLinux then linux-pam else openpam;
  linux-pam = callPackage ../os-specific/linux/pam { };

```

`wayland` is apparently a darwin package. This might be related to [Search results missing some packages · Issue #708 · NixOS/nixos-search · GitHub](https://github.com/NixOS/nixos-search/issues/708)

```auto
  wayland = darwin.apple_sdk_11_0.callPackage ../development/libraries/wayland { };

```

---

<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: [August 18, 2024, 11:45am UTC](https://discourse.nixos.org/t/quite-confused-with-some-un-searchable-nix-pakages/50782/3 "2024-08-18T11:45:52Z")

</div>

Also, if you want to know where an attribute is defined, you can use:

```auto
nix-repl> builtins.unsafeGetAttrPos "pam" pkgs
{
  column = 3;
  file = "/nix/store/9g7xq4cldszn00p70awljpim92xg2c1s-source/pkgs/top-level/all-packages.nix";
  line = 27037;
}

```

which (given that my nixpkgs revision is `c3aa7b8938b17aebd2deecf7be0636000d62a2b9`) points to [https://github.com/NixOS/nixpkgs/blob/c3aa7b8938b17aebd2deecf7be0636000d62a2b9/pkgs/top-level/all-packages.nix#L27037](https://github.com/NixOS/nixpkgs/blob/c3aa7b8938b17aebd2deecf7be0636000d62a2b9/pkgs/top-level/all-packages.nix#L27037)

If the above command shows `null`, it’s probably defined in `pkgs/by-name` instead (which you can verify with the `meta.position` as mentioned above).

---

<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: [August 18, 2024, 11:49am UTC](https://discourse.nixos.org/t/quite-confused-with-some-un-searchable-nix-pakages/50782/4 "2024-08-18T11:49:20Z")

</div>

> [@eljamm](#):
>
> `wayland` is apparently a darwin package

Yes, but no, it’s using the darwin `callPackage` which permits it to be used on darwin and non-darwin alike. The main benefit of using this is to not have to use `darwin` as a package argument and pass the actual frameworks in instead, which makes for (presumably) easier overrides.  
(Though I can’t say if it’s actually easier, I’ve never used darwin.)

---

<div class="post-metadata">

### Author: ![emily](https://discourse.nixos.org/user_avatar/discourse.nixos.org/emily/32/1628_2.png) [@emily](https://discourse.nixos.org/u/emily)
#### Post date: [August 18, 2024, 1:09pm UTC](https://discourse.nixos.org/t/quite-confused-with-some-un-searchable-nix-pakages/50782/5 "2024-08-18T13:09:18Z")

</div>

It mostly makes things worse and is going away soon: [On the future of Darwin SDKs (or how you can stop worrying and put the SDK in build inputs)](https://discourse.nixos.org/t/on-the-future-of-darwin-sdks-or-how-you-can-stop-worrying-and-put-the-sdk-in-build-inputs/50574).

---

<div class="post-metadata">

### Author: ![reckenrode](https://discourse.nixos.org/user_avatar/discourse.nixos.org/reckenrode/32/2044_2.png) [@reckenrode](https://discourse.nixos.org/u/reckenrode)
#### Post date: [August 18, 2024, 6:59pm UTC](https://discourse.nixos.org/t/quite-confused-with-some-un-searchable-nix-pakages/50782/6 "2024-08-18T18:59:07Z")

</div>

Wayland builds some things on Darwin though not everything. It’s not particular useful, but it’s also not harmful allowing it to build (especially if it makes things easier for Linux maintainers).
