def read_nix_prop(prop):
    """Reads the value from a nix property.

    It is slightly different between versions, so this works across all nix
    versions.
    """
    try:
        return prop.values[0].value
    except AttributeError:
        return prop.values[0]