My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/servers/mail/mailman/wrapped.nix

20 lines
518 B

{ runCommand, lib, makeWrapper, python3
, archivers ? [ python3.pkgs.mailman-hyperkitty ]
}:
let
inherit (python3.pkgs) makePythonPath mailman;
in
runCommand "${mailman.name}-wrapped" {
inherit (mailman) meta;
nativeBuildInputs = [ makeWrapper ];
passthru = mailman.passthru // { unwrapped = mailman; };
} ''
mkdir -p "$out/bin"
cd "${mailman}/bin"
for exe in *; do
makeWrapper "${mailman}/bin/$exe" "$out/bin/$exe" \
--set PYTHONPATH ${makePythonPath ([ mailman ] ++ archivers)}
done
''