How is someone supposed to check if a Nix list contains a string?
I’ve searched Nixpkgs, the Nix Manual, the NixOS Wiki, and this forum for the answer, to no avail.
How is someone supposed to check if a Nix list contains a string?
I’ve searched Nixpkgs, the Nix Manual, the NixOS Wiki, and this forum for the answer, to no avail.
Use the builtins.elem
function, like builtins.elem "a" ["a" "b"] # => true