mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
nixos/mailman: create "mailman" executable as a proper wrapper script
This commit is contained in:
parent
1cb5cff611
commit
a7941fe210
1 changed files with 5 additions and 5 deletions
|
@ -6,17 +6,17 @@ let
|
|||
|
||||
cfg = config.services.mailman;
|
||||
|
||||
mailmanPyEnv = pkgs.python3.withPackages (ps: [ps.mailman ps.mailman-hyperkitty]);
|
||||
mailmanPyEnv = pkgs.python3.withPackages (ps: with ps; [mailman mailman-hyperkitty]);
|
||||
|
||||
mailmanExe = with pkgs; stdenv.mkDerivation {
|
||||
name = "mailman-" + python3Packages.mailman.version;
|
||||
buildInputs = [makeWrapper];
|
||||
unpackPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
sed >"$out/bin/mailman" <"${mailmanPyEnv}/bin/mailman" \
|
||||
-e "2 iexport MAILMAN_CONFIG_FILE=/etc/mailman.cfg"
|
||||
chmod +x $out/bin/mailman
|
||||
'';
|
||||
makeWrapper ${mailmanPyEnv}/bin/mailman $out/bin/mailman \
|
||||
--set MAILMAN_CONFIG_FILE /etc/mailman.cfg
|
||||
'';
|
||||
};
|
||||
|
||||
mailmanCfg = ''
|
||||
|
|
Loading…
Reference in a new issue