2 ms·
Maybe `isLinux` is not the best example, as it's pretty much a self-documented boolean. But when I'm in the general situation you describe, I tend to just searc
by capableweb 4y ago
Maybe `isLinux` is not the best example, as it's pretty much a self-documented boolean. But when I'm in the general situation you describe, I tend to just search github.com/NixOS/nixpkgs in order to figure out usage, if it's not documented elsewhere already.
Here is an example for isLinux specifically: https://github.com/NixOS/nixpkgs/search?q=isLinux https://github.com/NixOS/nixpkgs/search?q=isLinux
Reading through how the stdenv stuff is working might help as well, the generic lists a bunch of "is" booleans: https://github.com/NixOS/nixpkgs/blob/7e325cb89453651dbe9a17b67a4f85c4f71d4c08/pkgs/stdenv/generic/default.nix#L147 https://github.com/NixOS/nixpkgs/blob/7e325cb89453651dbe9a17...
In general I agree, things are vastly under-documented, and that makes it kind of hard, and only solution I've found is digging deeper into sources. Which had the happy side-effect of me understanding NixOS better as well.