2020-04-24 23:36:52 +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-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +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
|
|
|
|
''
|