Merge pull request #137379 from aanderse/maddy
maddy: include systemd units
This commit is contained in:
commit
2abede4e5e
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user