Merge pull request #137379 from aanderse/maddy

maddy: include systemd units
This commit is contained in:
Sandro 2021-09-11 16:23:57 +02:00 committed by GitHub
commit 2abede4e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, coreutils }:
buildGoModule rec {
pname = "maddy";
@ -17,6 +17,18 @@ buildGoModule rec {
subPackages = [ "cmd/maddy" "cmd/maddyctl" ];
postInstall = ''
mkdir -p $out/lib/systemd/system
substitute dist/systemd/maddy.service $out/lib/systemd/system/maddy.service \
--replace "/usr/bin/maddy" "$out/bin/maddy" \
--replace "/bin/kill" "${coreutils}/bin/kill"
substitute dist/systemd/maddy@.service $out/lib/systemd/system/maddy@.service \
--replace "/usr/bin/maddy" "$out/bin/maddy" \
--replace "/bin/kill" "${coreutils}/bin/kill"
'';
meta = with lib; {
description = "Composable all-in-one mail server";
homepage = "https://foxcpp.dev/maddy";