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,16 +6,16 @@ let
|
||||||
|
|
||||||
cfg = config.services.mailman;
|
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 {
|
mailmanExe = with pkgs; stdenv.mkDerivation {
|
||||||
name = "mailman-" + python3Packages.mailman.version;
|
name = "mailman-" + python3Packages.mailman.version;
|
||||||
|
buildInputs = [makeWrapper];
|
||||||
unpackPhase = ":";
|
unpackPhase = ":";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
sed >"$out/bin/mailman" <"${mailmanPyEnv}/bin/mailman" \
|
makeWrapper ${mailmanPyEnv}/bin/mailman $out/bin/mailman \
|
||||||
-e "2 iexport MAILMAN_CONFIG_FILE=/etc/mailman.cfg"
|
--set MAILMAN_CONFIG_FILE /etc/mailman.cfg
|
||||||
chmod +x $out/bin/mailman
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue