maddy: include systemd units
This commit is contained in:
parent
1b137b1595
commit
eb2457fe26
|
@ -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 a new issue