From 4b8644b7a69821f5e0bd07ba6350087a3b08dcb3 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sun, 15 Sep 2024 22:24:10 +0000 Subject: [PATCH] fetchdarcs: support `hash` attribute --- pkgs/build-support/fetchdarcs/default.nix | 30 ++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/pkgs/build-support/fetchdarcs/default.nix b/pkgs/build-support/fetchdarcs/default.nix index 6073efec2815..320b201f2853 100644 --- a/pkgs/build-support/fetchdarcs/default.nix +++ b/pkgs/build-support/fetchdarcs/default.nix @@ -1,21 +1,23 @@ {stdenvNoCC, darcs, cacert, lib}: lib.makeOverridable ( -{ url -, rev ? null -, context ? null -, sha256 ? "" -, name ? "fetchdarcs" -}: + lib.fetchers.withNormalizedHash { } ( + { url + , rev ? null + , context ? null + , outputHash ? lib.fakeHash + , outputHashAlgo ? null + , name ? "fetchdarcs" + }: -stdenvNoCC.mkDerivation { - builder = ./builder.sh; - nativeBuildInputs = [cacert darcs]; + stdenvNoCC.mkDerivation { + builder = ./builder.sh; + nativeBuildInputs = [cacert darcs]; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = sha256; + inherit outputHash outputHashAlgo; + outputHashMode = "recursive"; - inherit url rev context name; -} + inherit url rev context name; + } + ) )