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