From 94d3d94a57cfa9077500116e7bf72174f1b563b6 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 20 Jan 2023 14:13:08 +0800 Subject: [PATCH] vsmtp: fix build --- pkgs/servers/mail/vsmtp/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/servers/mail/vsmtp/default.nix b/pkgs/servers/mail/vsmtp/default.nix index f9b595ec8f9e..521e6dafd834 100644 --- a/pkgs/servers/mail/vsmtp/default.nix +++ b/pkgs/servers/mail/vsmtp/default.nix @@ -1,6 +1,7 @@ { lib , rustPlatform , fetchFromGitHub +, fetchpatch , installShellFiles , testers , vsmtp @@ -17,6 +18,16 @@ rustPlatform.buildRustPackage rec { hash = "sha256-uyu2NpHFDqJDcfQukG6TdRH7KuZnrYTULvLiABdvAog="; }; + patches = [ + # https://github.com/viridIT/vSMTP/pull/952 + # treewide: set GIT_HASH to unknown if git rev-parse HEAD fails + (fetchpatch { + url = "https://github.com/viridIT/vSMTP/commit/0ac4820c079e459f515825dfb451980119eaae9e.patch"; + includes = [ "src/vsmtp/vsmtp-core/build.rs" "src/vqueue/build.rs" ]; + hash = "sha256-kGjXsVokP6039rksaxw1EM/0zOlKIus1EaIEsFJvLE8="; + }) + ]; + cargoHash = "sha256-A0Q6ciZJL13VzJgZIWZalrRElSNGHUN/9b8Csj4Tdak="; nativeBuildInputs = [ installShellFiles ];