3
0
Fork 0
forked from mirrors/nixpkgs

opensmtpd service: use explicit pkgs for consistency

This commit is contained in:
Joachim Fasting 2016-10-24 17:53:50 +02:00
parent 37afc5cda1
commit 946fe73b56

View file

@ -1,17 +1,16 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with pkgs;
with lib; with lib;
let let
cfg = config.services.opensmtpd; cfg = config.services.opensmtpd;
conf = writeText "smtpd.conf" cfg.serverConfiguration; conf = pkgs.writeText "smtpd.conf" cfg.serverConfiguration;
args = concatStringsSep " " cfg.extraServerArgs; args = concatStringsSep " " cfg.extraServerArgs;
sendmail = pkgs.runCommand "opensmtpd-sendmail" {} '' sendmail = pkgs.runCommand "opensmtpd-sendmail" {} ''
mkdir -p $out/bin mkdir -p $out/bin
ln -s ${opensmtpd}/sbin/smtpctl $out/bin/sendmail ln -s ${pkgs.opensmtpd}/sbin/smtpctl $out/bin/sendmail
''; '';
in { in {
@ -100,7 +99,7 @@ in {
systemd.services.opensmtpd = let systemd.services.opensmtpd = let
procEnv = pkgs.buildEnv { procEnv = pkgs.buildEnv {
name = "opensmtpd-procs"; name = "opensmtpd-procs";
paths = [ opensmtpd ] ++ cfg.procPackages; paths = [ pkgs.opensmtpd ] ++ cfg.procPackages;
pathsToLink = [ "/libexec/opensmtpd" ]; pathsToLink = [ "/libexec/opensmtpd" ];
}; };
in { in {