xonsh: 0.14.0 -> 0.14.4 (#282368)

* xonsh-unwrapped: add passthru.updateScript

* xonsh-unwrapped: move to pkgs/shells/xonsh/unwrapped.nix

* xonsh-unwrapped: incorporate into xonsh wrapper

* xonsh: migrate to by-name

* xonsh: refactor

- get rid of rec
- Boolean pyproject
- reorder attributes
- get rid of nested with
- change meta.maintainers:
  - remove vrthra
  - add AndersonTorres

* xonsh: 0.14.0 -> 0.14.1

* xonsh: 0.14.1 -> 0.14.2

* xonsh: 0.14.2 -> 0.14.3

* xonsh: 0.14.3 -> 0.14.4
This commit is contained in:
Anderson Torres 2024-02-04 19:06:22 -03:00 committed by GitHub
parent 1c38e7bc14
commit a30ae78435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 69 additions and 54 deletions

View File

@ -0,0 +1,23 @@
{ 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
''

View File

@ -1,24 +1,40 @@
{ lib
, fetchFromGitHub
, python3
, glibcLocales
, coreutils
, fetchFromGitHub
, git
, gitUpdater
, glibcLocales
, python3
}:
python3.pkgs.buildPythonApplication rec {
let
pname = "xonsh";
version = "0.14.0";
format = "pyproject";
version = "0.14.4";
in
python3.pkgs.buildPythonApplication {
inherit pname version;
pyproject = true;
# fetch from github because the pypi package ships incomplete tests
src = fetchFromGitHub {
owner = "xonsh";
repo = "xonsh";
rev = "refs/tags/${version}";
hash = "sha256-ZrPKKa/vl06QAjGr16ZzKF/DAByFHr6ze2WVOCa+wf8=";
hash = "sha256-7qOEc4RSdOO059LietKnrxY7cy9MfgmfJjdqZZ5ENLU=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools
wheel
];
propagatedBuildInputs = with python3.pkgs; [
ply
prompt-toolkit
pygments
];
env.LC_ALL = "en_US.UTF-8";
postPatch = ''
@ -32,11 +48,6 @@ python3.pkgs.buildPythonApplication rec {
patchShebangs .
'';
nativeBuildInputs = with python3.pkgs; [
setuptools
wheel
];
disabledTests = [
# fails on sandbox
"test_colorize_file"
@ -64,25 +75,32 @@ python3.pkgs.buildPythonApplication rec {
"tests/completers/test_bash_completer.py"
];
nativeCheckInputs = [
git
glibcLocales
] ++ (with python3.pkgs; [
pip
pyte
pytest-mock
pytest-subprocess
pytestCheckHook
]);
preCheck = ''
HOME=$TMPDIR
export HOME=$TMPDIR
'';
nativeCheckInputs = [ glibcLocales git ] ++
(with python3.pkgs; [ pip pyte pytestCheckHook pytest-mock pytest-subprocess ]);
propagatedBuildInputs = with python3.pkgs; [ ply prompt-toolkit pygments ];
meta = with lib; {
description = "A Python-ish, BASHwards-compatible shell";
homepage = "https://xon.sh/";
changelog = "https://github.com/xonsh/xonsh/raw/${version}/CHANGELOG.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ vrthra ];
};
passthru = {
shellPath = "/bin/xonsh";
python = python3;
python = python3; # To the wrapper
updateScript = gitUpdater { };
};
meta = {
homepage = "https://xon.sh/";
description = "A Python-ish, BASHwards-compatible shell";
changelog = "https://github.com/xonsh/xonsh/raw/${version}/CHANGELOG.rst";
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ AndersonTorres ];
};
}

View File

@ -1,24 +0,0 @@
{ 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
''

View File

@ -1149,6 +1149,7 @@ mapAliases ({
xdg_utils = xdg-utils; # Added 2021-02-01
xineLib = xine-lib; # Added 2021-04-27
xineUI = xine-ui; # Added 2021-04-27
xonsh-unwrapped = throw "'xonsh-unwrapped' was incorporated into xonsh code; call xonsh directly instead."; # Added 2024-01-20
xtrt = throw "xtrt has been removed due to being abandoned"; # Added 2023-05-25
xulrunner = firefox-unwrapped; # Added 2023-11-03
xvfb_run = xvfb-run; # Added 2021-05-07

View File

@ -15394,9 +15394,6 @@ with pkgs;
rush = callPackage ../shells/rush { };
xonsh = callPackage ../shells/xonsh/wrapper.nix { };
xonsh-unwrapped = callPackage ../shells/xonsh { };
zsh = callPackage ../shells/zsh { };
nix-zsh-completions = callPackage ../shells/zsh/nix-zsh-completions { };