query
On this page

fetchFromRadicle

pkgs.fetchFromRadicle

Functor
Docs pulled from | This Revision | 35 minutes ago

No reference documentation found yet.

Contribute now!


Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.

Noogle detected

This is a Functor

Learn about functors

Implementation

The following is the current implementation of this function.

{
    seed,
    repo,
    node ? null,
    rev ? null,
    tag ? null,
    ...
  }@args:

  assert lib.assertMsg (lib.xor (tag != null) (
    rev != null
  )) "fetchFromRadicle requires one of either `rev` or `tag` to be provided (not both).";

  let
    namespacePrefix = lib.optionalString (node != null) "refs/namespaces/${node}/";
    rev' = if tag != null then "refs/tags/${tag}" else rev;
  in

  fetchgit (
    {
      url = "https://${seed}/${repo}.git";
      rev = "${namespacePrefix}${rev'}";
    }
    // removeAttrs args [
      "seed"
      "repo"
      "node"
      "rev"
      "tag"
    ]
  )
  // {
    inherit
      seed
      repo
      node
      rev
      tag
      ;
  }