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

11 lines
324 B
Nix
Raw Normal View History

2019-08-07 22:14:43 +02:00
{ 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"])