9 # selector is a function mapping pythonPackages to a list of plugins
10 # e.g. `mdformat.withPlugins (ps: with ps; [ mdformat-footnote ])`
11 withPlugins = selector: runCommand "mdformat-wrapped" {
12 inherit (python.pkgs.mdformat) pname version meta;
15 python.pkgs.wrapPython
18 plugins = selector python.pkgs;
24 buildPythonPath $plugins
25 makeWrapper ${lib.getExe python.pkgs.mdformat} $out/bin/mdformat \
26 --suffix PYTHONPATH : "$program_PYTHONPATH"
28 in withPlugins (ps: [ ])