nurl

release version deps license ci

Generate Nix fetcher calls from repository URLs

console $ nurl https://github.com/nix-community/patsh v0.2.0 2>/dev/null fetchFromGitHub { owner = "nix-community"; repo = "patsh"; rev = "v0.2.0"; hash = "sha256-7HXJspebluQeejKYmVA7sy/F3dtU1gc4eAbKiPexMMA="; }

Supported Fetchers

Usage

``` Usage: nurl [OPTIONS] [URL] [REV]

Arguments: [URL] URL to the repository to be fetched [REV] the revision or reference to be fetched

Options: -f, --fetcher specify the fetcher function instead of inferring from the URL [possible values: fetchFromBitbucket, fetchFromGitHub, fetchFromGitLab, fetchFromGitea, fetchFromGitiles, fetchFromRepoOrCz, fetchFromSourcehut, fetchgit, fetchhg, fetchsvn] -i, --indent extra indentation (in number of spaces) [default: 0] -j, --json output in json format -a, --arg additional arguments to pass to the fetcher -A, --arg-str same as --arg, but accepts strings instead Nix expressions -o, --overwrite overwrite arguments in the final output, not taken into consideration when fetching the hash -O, --overwrite-str same as --overwrite, but accepts strings instead Nix expressions -l, --list-fetchers List all available fetchers -L, --list-possible-fetchers List all fetchers that can be generated without --fetcher -s, --list-sep Print out the listed fetchers with the specified separator, only used when --list-fetchers or --list-possible-fetchers is specified -h, --help Print help information (use --help for more detail) -V, --version Print version information ```

Comparison to nix-prefetch

Changelog

See CHANGELOG.md