mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 00:53:57 +00:00
25 lines
447 B
Nix
25 lines
447 B
Nix
{
|
|
lib,
|
|
python3,
|
|
runCommand,
|
|
# configurable options
|
|
extraPackages ? (ps: [ ]),
|
|
}:
|
|
|
|
let
|
|
pythonEnv = python3.withPackages
|
|
(ps: [ ps.xonsh ] ++ extraPackages ps);
|
|
xonsh = python3.pkgs.xonsh;
|
|
in
|
|
runCommand
|
|
"xonsh-${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
|
|
''
|