From f0ccbfb33109ac65d09792cc3df8b5be348c149a Mon Sep 17 00:00:00 2001 From: toastal Date: Sun, 4 Feb 2024 02:29:28 +0700 Subject: [PATCH] abduco: add mirror, remove recursion > You can always fetch the current code base from the git repository > located at GitHub or SourceHut. The owner says the source code will be offered in two places so the code fetching should reflect the mirror & it adds resiliance. --- pkgs/tools/misc/abduco/default.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/misc/abduco/default.nix b/pkgs/tools/misc/abduco/default.nix index a551fa0a7ee0..011f186bbbe2 100644 --- a/pkgs/tools/misc/abduco/default.nix +++ b/pkgs/tools/misc/abduco/default.nix @@ -1,14 +1,18 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, writeText, conf ? null }: +{ lib, stdenv, fetchpatch, fetchzip, writeText, conf ? null }: -stdenv.mkDerivation rec { +let + rev = "8c32909a159aaa9484c82b71f05b7a73321eb491"; +in +stdenv.mkDerivation { pname = "abduco"; - version = "2020-04-30"; + version = "unstable-2020-04-30"; - src = fetchFromGitHub { - owner = "martanne"; - repo = "abduco"; - rev = "8c32909a159aaa9484c82b71f05b7a73321eb491"; - sha256 = "0a3p8xljhpk7zh203s75248blfir15smgw5jmszwbmdpy4mqzd53"; + src = fetchzip { + urls = [ + "https://github.com/martanne/abduco/archive/${rev}.tar.gz" + "https://git.sr.ht/~martanne/abduco/archive/${rev}.tar.gz" + ]; + hash = "sha256-o7SPK/G31cW/rrLwV3UJOTq6EBHl6AEE/GdeKGlHdyg="; }; preBuild = lib.optionalString (conf != null)