Missing documentation of makeAutostartItem

Looking at https://github.com/NixOS/nixpkgs/blob/0417e8e11fcd58dc571f045c51bbad50d0cf438e/nixos/tests/gnome.nix I found the use of makeAutostartItem. I don’t find any documentation mention the function. I don’t even find its implementation. If it would be documented where should this be?

1 Like

funny enough here is a blast from the past


that mentioned the fact it appears, but the relevant documentation was never added.

it’s definition can be found in all-packages.nix.

 makeAutostartItem = callPackage ../build-support/make-startupitem { };

which leads you to.

it’s not a derivation that can be built in it’s own right… i’ve not seen that pattern before, especially used in connection with environment.systemPackages , but now you have the definition. Top level redirection/aliases can catch you out if your new to nixpkgs.

as for documentation , it should be in https://github.com/NixOS/nixpkgs/tree/master/doc

I think that some nixers think that very small functions like this , isn’t worth documentation for, because you just hunt for an example when you need it.

good first issue for someone


I see all-packages.nix is too big to be searched by github. What is the purpose of this file? (I mean what is the design choice to put so much information into one file?)

try Sourcegraph , it will give you more joy searching for things!!!

or get a local checkout of nixpkgs via git and use something like ripgrep!! … it’s fast!

It’s big, because nixpkgs is sometimes a victim of it’s own success and has scaling problems in every way you could think of.

However some very talented nixers fight against these scaling problems.

a curse of having a lot of packages in the repo!!! :slight_smile:

Well, there’s no technical reason it couldn’t be split, e.g. into all-packages-a-to-m.nix and all-packages-n-to-z.nix. Some package sets are already split out, like Python, Haskell, etc. But most development happens locally so the failure of Github search is not too inconvenient. But perhaps it should be noted somewhere.