From 6afbeda9d67dbf8ef62399eb5779721577c9a89b Mon Sep 17 00:00:00 2001 From: Julius Rickert Date: Thu, 27 Jul 2023 12:23:45 +0200 Subject: [PATCH 1/3] smtprelay: init at 1.10.0 --- pkgs/servers/mail/smtprelay/default.nix | 26 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/servers/mail/smtprelay/default.nix diff --git a/pkgs/servers/mail/smtprelay/default.nix b/pkgs/servers/mail/smtprelay/default.nix new file mode 100644 index 000000000000..9e0e8c5be3e5 --- /dev/null +++ b/pkgs/servers/mail/smtprelay/default.nix @@ -0,0 +1,26 @@ +{ lib, buildGoModule, fetchFromGitHub }: +buildGoModule rec { + pname = "smtprelay"; + version = "1.10.0"; + + src = fetchFromGitHub { + owner = "decke"; + repo = "smtprelay"; + rev = "v${version}"; + hash = "sha256-zZ3rgbo8nvrpFMtUmhyXnTgoVd0FIh1kWzuM2hCh5gY="; + }; + + vendorHash = "sha256-assGzM8/APNVVm2vZapPK6sh3tWNTnw6PSFwvEqNDPk="; + + CGO_ENABLED = 0; + + # We do not supply the build time as the build wouldn't be reproducible otherwise. + ldflags = [ "-s" "-w" "-X main.appVersion=v${version}" ]; + + meta = with lib; { + homepage = "https://github.com/decke/smtprelay"; + description = "Simple Golang SMTP relay/proxy server"; + license = licenses.mit; + maintainers = with maintainers; [ juliusrickert ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5785981cb561..42d54539e4ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26579,6 +26579,8 @@ with pkgs; quark = callPackage ../servers/http/quark { }; + smtprelay = callPackage ../servers/mail/smtprelay { }; + soft-serve = callPackage ../servers/soft-serve { }; sympa = callPackage ../servers/mail/sympa { }; From 1449ebdc3402077fa08872667a043eda749e5aee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 13 Oct 2023 11:50:48 +0200 Subject: [PATCH 2/3] smtprelay: add changelog to meta - equalize file content --- pkgs/servers/mail/smtprelay/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/mail/smtprelay/default.nix b/pkgs/servers/mail/smtprelay/default.nix index 9e0e8c5be3e5..b4dd75a42bd0 100644 --- a/pkgs/servers/mail/smtprelay/default.nix +++ b/pkgs/servers/mail/smtprelay/default.nix @@ -1,4 +1,8 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib +, buildGoModule +, fetchFromGitHub +}: + buildGoModule rec { pname = "smtprelay"; version = "1.10.0"; @@ -6,7 +10,7 @@ buildGoModule rec { src = fetchFromGitHub { owner = "decke"; repo = "smtprelay"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-zZ3rgbo8nvrpFMtUmhyXnTgoVd0FIh1kWzuM2hCh5gY="; }; @@ -15,11 +19,16 @@ buildGoModule rec { CGO_ENABLED = 0; # We do not supply the build time as the build wouldn't be reproducible otherwise. - ldflags = [ "-s" "-w" "-X main.appVersion=v${version}" ]; + ldflags = [ + "-s" + "-w" + "-X=main.appVersion=v${version}" + ]; meta = with lib; { homepage = "https://github.com/decke/smtprelay"; description = "Simple Golang SMTP relay/proxy server"; + changelog = "https://github.com/decke/smtprelay/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ juliusrickert ]; }; From 2cc85e74044be8484e7eb2e04381485024369dd7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 13 Oct 2023 12:21:20 +0200 Subject: [PATCH 3/3] smtprelay: don't build subpackages --- pkgs/servers/mail/smtprelay/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/mail/smtprelay/default.nix b/pkgs/servers/mail/smtprelay/default.nix index b4dd75a42bd0..8142dc76b98b 100644 --- a/pkgs/servers/mail/smtprelay/default.nix +++ b/pkgs/servers/mail/smtprelay/default.nix @@ -16,6 +16,10 @@ buildGoModule rec { vendorHash = "sha256-assGzM8/APNVVm2vZapPK6sh3tWNTnw6PSFwvEqNDPk="; + subPackages = [ + "." + ]; + CGO_ENABLED = 0; # We do not supply the build time as the build wouldn't be reproducible otherwise.