ProductPromotion
Logo

Rust

made by https://0x3d.site

GitHub - nix-community/nurl: Generate Nix fetcher calls from repository URLs [maintainer=@figsoda]
Generate Nix fetcher calls from repository URLs [maintainer=@figsoda] - nix-community/nurl
Visit Site

GitHub - nix-community/nurl: Generate Nix fetcher calls from repository URLs [maintainer=@figsoda]

GitHub - nix-community/nurl: Generate Nix fetcher calls from repository URLs [maintainer=@figsoda]

nurl

release version deps license ci

Generate Nix fetcher calls from repository URLs

$ 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=";
}

If you want to generate Nix packages, feel free check out nix-init, which builds on top of nurl

Supported Fetchers

  • builtins.fetchGit
  • fetchCrate
  • fetchFromBitbucket
  • fetchFromGitHub
  • fetchFromGitLab
  • fetchFromGitea
  • fetchFromGitiles
  • fetchFromRepoOrCz
  • fetchFromSourcehut
  • fetchHex
  • fetchPypi
  • fetchgit
  • fetchhg
  • fetchsvn

Usage

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

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

Options:
  -S, --submodules[=<SUBMODULES>]      Fetch submodules instead of using the fetcher's default [possible
                                       values: true, false]
  -f, --fetcher <FETCHER>              Specify the fetcher function instead of inferring from the
                                       URL [possible values: builtins.fetchGit, fetchCrate,
                                       fetchFromBitbucket, fetchFromGitHub, fetchFromGitLab,
                                       fetchFromGitea, fetchFromGitiles, fetchFromRepoOrCz,
                                       fetchFromSourcehut, fetchHex, fetchPypi, fetchgit, fetchhg,
                                       fetchsvn]
  -F, --fallback <FALLBACK>            The fetcher to fall back to when nurl fails to infer it from
                                       the URL [default: fetchgit] [possible values:
                                       builtins.fetchGit, fetchCrate, fetchFromBitbucket,
                                       fetchFromGitHub, fetchFromGitLab, fetchFromGitea,
                                       fetchFromGitiles, fetchFromRepoOrCz, fetchFromSourcehut,
                                       fetchHex, fetchPypi, fetchgit, fetchhg, fetchsvn]
  -n, --nixpkgs <NIXPKGS>              Path to nixpkgs (in nix) [default: <nixpkgs>]
  -i, --indent <INDENT>                Extra indentation (in number of spaces) [default: 0]
  -H, --hash                           Only output the hash
  -j, --json                           Output in json format
  -p, --parse                          Parse the url without fetching the hash, output in json
                                       format
  -a, --arg <NAME> <EXPR>              Additional arguments to pass to the fetcher
  -A, --arg-str <NAME> <STRING>        Same as --arg, but accepts strings instead Nix expressions
  -o, --overwrite <NAME> <EXPR>        Overwrite arguments in the final output, not taken into
                                       consideration when fetching the hash
  -O, --overwrite-str <NAME> <STRING>  Same as --overwrite, but accepts strings instead Nix
                                       expressions
  -e, --expr <EXPR>                    Instead of fetching a URL, get the hash of a fixed-output
                                       derivation, implies --hash and ignores all other options
  -l, --list-fetchers                  List all available fetchers
  -L, --list-possible-fetchers         List all fetchers that can be generated without --fetcher
  -s, --list-sep <SEPARATOR>           Print out the listed fetchers with the specified separator,
                                       only used when --list-fetchers or --list-possible-fetchers is
                                       specified
  -h, --help                           Print help
  -V, --version                        Print version

Comparison to nix-prefetch

  • 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 is more configurable and supports file attributes.
  • nix-prefetch has an interface similar to nix-build.
  • nurl has some nice features dedicated to generated packages (--indent, --list-possible-fetchers).

Changelog

See CHANGELOG.md

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory