9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
24 lines
465 B
Nix
24 lines
465 B
Nix
{ runCommand
|
|
, xonsh-unwrapped
|
|
, lib
|
|
, extraPackages ? (ps: [ ])
|
|
}:
|
|
|
|
let
|
|
xonsh = xonsh-unwrapped;
|
|
inherit (xonsh.passthru) python;
|
|
|
|
pythonEnv = python.withPackages (ps: [
|
|
(ps.toPythonModule xonsh)
|
|
] ++ extraPackages ps);
|
|
|
|
in
|
|
runCommand "${xonsh.pname}-${xonsh.version}"
|
|
{
|
|
inherit (xonsh) pname version meta passthru;
|
|
} ''
|
|
mkdir -p $out/bin
|
|
for bin in ${lib.getBin xonsh}/bin/*; do
|
|
ln -s ${pythonEnv}/bin/$(basename "$bin") $out/bin/
|
|
done
|
|
''
|