morph-rc/configuration/lib/fetch/from-cryto-git.nix

11 lines
324 B
Nix

{ pkgs, ... }:
{owner, repo, rev, name ? ("${repo}-${rev}-src.tar.gz"), ...}@sourceArgs:
let
baseUrl = "https://git.cryto.net/${owner}/${repo}";
in
pkgs.fetchurl ({
inherit name;
url = "${baseUrl}/archive/${rev}.tar.gz";
meta.homepage = baseUrl;
} // removeAttrs sourceArgs ["owner" "repo" "rev"])