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=";
}
--fetcher fetchhg
)``` 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
nurl
infers the fetcher from the URL. For nix-prefetch
, you need to pick the fetcher and supply the arguments manually.nix-prefetch
relies on FOD which is slow, nurl
tries to use alternatives when possible.nix-prefetch
supports arbitrary expressions (planned for nurl
) and file attributes.nix-prefetch
is more configurable and has an interface similar to nix-build
.nurl
has some nice features dedicated to generated packages (--indent
, --list-possible-fetchers
).See CHANGELOG.md