2020-01-09 21:12:59 +00:00
|
|
|
{ runCommand, lib, makeWrapper, python3
|
|
|
|
, archivers ? [ python3.pkgs.mailman-hyperkitty ]
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (python3.pkgs) makePythonPath mailman;
|
|
|
|
in
|
|
|
|
|
|
|
|
runCommand "${mailman.name}-wrapped" {
|
|
|
|
inherit (mailman) meta;
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-01-09 21:12:59 +00:00
|
|
|
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
|
|
|
|
''
|