Noogλe

search input

Function of the day

  • Check whether a value x is a store path.

    Inputs

    x
    1. Function argument

    Type

    isStorePath :: Any -> Bool
    

    Examples

    lib.strings.isStorePath usage example

    isStorePath "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/bin/python"
    => false
    isStorePath "/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11"
    => true
    isStorePath pkgs.python
    => true
    isStorePath [] || isStorePath 42 || isStorePath {} ||=> false