mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
21 lines
512 B
Nix
21 lines
512 B
Nix
|
{ runCommand, lib, makeWrapper, python3
|
||
|
, archivers ? [ python3.pkgs.mailman-hyperkitty ]
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
inherit (python3.pkgs) makePythonPath mailman;
|
||
|
in
|
||
|
|
||
|
runCommand "${mailman.name}-wrapped" {
|
||
|
inherit (mailman) meta;
|
||
|
buildInputs = [ 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
|
||
|
''
|