{"id":13611735,"url":"https://github.com/nix-community/nurl","last_synced_at":"2025-05-14T08:06:16.788Z","repository":{"id":65143835,"uuid":"583512692","full_name":"nix-community/nurl","owner":"nix-community","description":"Generate Nix fetcher calls from repository URLs [maintainer=@figsoda]","archived":false,"fork":false,"pushed_at":"2024-12-11T15:58:07.000Z","size":747,"stargazers_count":563,"open_issues_count":24,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-08T12:25:17.197Z","etag":null,"topics":["bitbucket","codeberg","crate","crates","fetch","git","gitea","github","gitlab","hg","mercurial","nix","prefetch","sourcehut","svn"],"latest_commit_sha":null,"homepage":"https://discourse.nixos.org/t/24374","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nix-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"nix-community"}},"created_at":"2022-12-30T02:06:33.000Z","updated_at":"2025-05-07T09:18:56.000Z","dependencies_parsed_at":"2023-09-23T10:44:10.008Z","dependency_job_id":"760f1fb4-3a1e-456a-a898-735af1266ccd","html_url":"https://github.com/nix-community/nurl","commit_stats":{"total_commits":425,"total_committers":2,"mean_commits":212.5,"dds":"0.35529411764705887","last_synced_commit":"3a3ba7f0d14d92e1266395d826c6e229797d0044"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nix-community","download_url":"https://codeload.github.com/nix-community/nurl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253831229,"owners_count":21971057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket","codeberg","crate","crates","fetch","git","gitea","github","gitlab","hg","mercurial","nix","prefetch","sourcehut","svn"],"created_at":"2024-08-01T19:02:03.251Z","updated_at":"2025-05-14T08:06:16.744Z","avatar_url":"https://github.com/nix-community.png","language":"Rust","funding_links":["https://opencollective.com/nix-community"],"categories":["Rust","Applications","nix","Command-Line Tools"],"sub_categories":["Utilities","Discovery"],"readme":"# nurl\n\n[![release](https://img.shields.io/github/v/release/nix-community/nurl?logo=github\u0026style=flat-square)](https://github.com/nix-community/nurl/releases)\n[![version](https://img.shields.io/crates/v/nurl?logo=rust\u0026style=flat-square)][crate]\n[![deps](https://deps.rs/repo/github/nix-community/nurl/status.svg?style=flat-square\u0026compact=true)](https://deps.rs/repo/github/nix-community/nurl)\n[![license](https://img.shields.io/badge/license-MPL--2.0-blue?style=flat-square)](https://www.mozilla.org/en-US/MPL/2.0)\n[![ci](https://img.shields.io/github/actions/workflow/status/nix-community/nurl/ci.yml?label=ci\u0026logo=github-actions\u0026style=flat-square)](https://github.com/nix-community/nurl/actions?query=workflow:ci)\n\nGenerate Nix fetcher calls from repository URLs\n\n```console\n$ nurl https://github.com/nix-community/patsh v0.2.0 2\u003e/dev/null\nfetchFromGitHub {\n  owner = \"nix-community\";\n  repo = \"patsh\";\n  rev = \"v0.2.0\";\n  hash = \"sha256-7HXJspebluQeejKYmVA7sy/F3dtU1gc4eAbKiPexMMA=\";\n}\n```\n\n\u003e If you want to generate Nix packages, feel free check out [nix-init](https://github.com/nix-community/nix-init), which builds on top of nurl\n\n## Supported Fetchers\n\n- builtins.fetchGit\n- fetchCrate\n- fetchFromBitbucket\n- fetchFromGitHub\n- fetchFromGitLab\n- fetchFromGitea\n- fetchFromGitiles\n- fetchFromRepoOrCz\n- fetchFromSourcehut\n- fetchHex\n- fetchPypi\n- fetchgit\n- fetchhg\n- fetchsvn\n\n## Usage\n\n```\nUsage: nurl [OPTIONS] [URL] [REV]\n\nArguments:\n  [URL]  URL to the repository to be fetched\n  [REV]  The revision or reference to be fetched\n\nOptions:\n  -S, --submodules[=\u003cSUBMODULES\u003e]      Fetch submodules instead of using the fetcher's default [possible\n                                       values: true, false]\n  -f, --fetcher \u003cFETCHER\u003e              Specify the fetcher function instead of inferring from the\n                                       URL [possible values: builtins.fetchGit, fetchCrate,\n                                       fetchFromBitbucket, fetchFromGitHub, fetchFromGitLab,\n                                       fetchFromGitea, fetchFromGitiles, fetchFromRepoOrCz,\n                                       fetchFromSourcehut, fetchHex, fetchPypi, fetchgit, fetchhg,\n                                       fetchsvn]\n  -F, --fallback \u003cFALLBACK\u003e            The fetcher to fall back to when nurl fails to infer it from\n                                       the URL [default: fetchgit] [possible values:\n                                       builtins.fetchGit, fetchCrate, fetchFromBitbucket,\n                                       fetchFromGitHub, fetchFromGitLab, fetchFromGitea,\n                                       fetchFromGitiles, fetchFromRepoOrCz, fetchFromSourcehut,\n                                       fetchHex, fetchPypi, fetchgit, fetchhg, fetchsvn]\n  -n, --nixpkgs \u003cNIXPKGS\u003e              Path to nixpkgs (in nix) [default: \u003cnixpkgs\u003e]\n  -i, --indent \u003cINDENT\u003e                Extra indentation (in number of spaces) [default: 0]\n  -H, --hash                           Only output the hash\n  -j, --json                           Output in json format\n  -p, --parse                          Parse the url without fetching the hash, output in json\n                                       format\n  -a, --arg \u003cNAME\u003e \u003cEXPR\u003e              Additional arguments to pass to the fetcher\n  -A, --arg-str \u003cNAME\u003e \u003cSTRING\u003e        Same as --arg, but accepts strings instead Nix expressions\n  -o, --overwrite \u003cNAME\u003e \u003cEXPR\u003e        Overwrite arguments in the final output, not taken into\n                                       consideration when fetching the hash\n  -O, --overwrite-str \u003cNAME\u003e \u003cSTRING\u003e  Same as --overwrite, but accepts strings instead Nix\n                                       expressions\n  -e, --expr \u003cEXPR\u003e                    Instead of fetching a URL, get the hash of a fixed-output\n                                       derivation, implies --hash and ignores all other options\n  -l, --list-fetchers                  List all available fetchers\n  -L, --list-possible-fetchers         List all fetchers that can be generated without --fetcher\n  -s, --list-sep \u003cSEPARATOR\u003e           Print out the listed fetchers with the specified separator,\n                                       only used when --list-fetchers or --list-possible-fetchers is\n                                       specified\n  -h, --help                           Print help\n  -V, --version                        Print version\n```\n\n## Comparison to [nix-prefetch](https://github.com/msteen/nix-prefetch)\n\n- `nurl` infers the fetcher from the URL. For `nix-prefetch`, you need to pick the fetcher and supply the arguments manually.\n- `nix-prefetch` relies on FOD which is slow, `nurl` tries to use alternatives when possible.\n- `nix-prefetch` is more configurable and supports file attributes.\n- `nix-prefetch` has an interface similar to `nix-build`.\n- `nurl` has some nice features dedicated to generated packages (`--indent`, `--list-possible-fetchers`).\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n\n[crate]: https://crates.io/crates/nurl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fnurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnix-community%2Fnurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fnurl/lists"}