From 30361c578fb4ece9def77ed5f6f2083f58a80e54 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sun, 15 Sep 2024 22:36:54 +0000 Subject: [PATCH] fetchsvnssh: support `hash` attribute --- pkgs/build-support/fetchsvnssh/default.nix | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/build-support/fetchsvnssh/default.nix b/pkgs/build-support/fetchsvnssh/default.nix index ef72de61fe21..e798044e2ea1 100644 --- a/pkgs/build-support/fetchsvnssh/default.nix +++ b/pkgs/build-support/fetchsvnssh/default.nix @@ -1,17 +1,19 @@ -{stdenvNoCC, subversion, sshSupport ? true, openssh ? null, expect}: -{username, password, url, rev ? "HEAD", sha256 ? ""}: +{lib, stdenvNoCC, subversion, sshSupport ? true, openssh ? null, expect}: +{username, password +, url, rev ? "HEAD" +, outputHash ? lib.fakeHash, outputHashAlgo ? null}: +lib.fetchers.withNormalizedHash { } ( + stdenvNoCC.mkDerivation { + name = "svn-export-ssh"; + builder = ./builder.sh; + nativeBuildInputs = [subversion expect]; -stdenvNoCC.mkDerivation { - name = "svn-export-ssh"; - builder = ./builder.sh; - nativeBuildInputs = [subversion expect]; + inherit outputHash outputHashAlgo; + outputHashMode = "recursive"; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = sha256; + sshSubversion = ./sshsubversion.exp; - sshSubversion = ./sshsubversion.exp; - - inherit username password url rev sshSupport openssh; -} + inherit username password url rev sshSupport openssh; + } +)