chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / xo / xonsh / unwrapped.nix
blob90afc4ddbcbdfbaa5fa266a8c4e34fd36725fc77
2   lib,
3   coreutils,
4   fetchFromGitHub,
5   git,
6   gitUpdater,
7   glibcLocales,
8   pythonPackages,
9 }:
11 let
13   argset = {
14     pname = "xonsh";
15     version = "0.18.3";
16     pyproject = true;
18     # PyPI package ships incomplete tests
19     src = fetchFromGitHub {
20       owner = "xonsh";
21       repo = "xonsh";
22       rev = "refs/tags/${argset.version}";
23       hash = "sha256-MJTsYnuFENHLDDMIWcs0IRcBmWs4XyfDWDG7AY2P6cM=";
24     };
26     nativeBuildInputs = with pythonPackages; [
27       setuptools
28       wheel
29     ];
31     propagatedBuildInputs = (
32       with pythonPackages;
33       [
34         ply
35         prompt-toolkit
36         pygments
37       ]
38     );
40     nativeCheckInputs =
41       [
42         git
43         glibcLocales
44       ]
45       ++ (with pythonPackages; [
46         pip
47         pyte
48         pytest-mock
49         pytest-subprocess
50         pytestCheckHook
51         requests
52       ]);
54     disabledTests = [
55       # fails on sandbox
56       "test_colorize_file"
57       "test_loading_correctly"
58       "test_no_command_path_completion"
59       "test_bsd_man_page_completions"
60       "test_xonsh_activator"
62       # fails on non-interactive shells
63       "test_capture_always"
64       "test_casting"
65       "test_command_pipeline_capture"
66       "test_dirty_working_directory"
67       "test_man_completion"
68       "test_vc_get_branch"
69       "test_bash_and_is_alias_is_only_functional_alias"
71       # flaky tests
72       "test_script"
73       "test_alias_stability"
74       "test_alias_stability_exception"
75       "test_complete_import"
76       "test_subproc_output_format"
78       # https://github.com/xonsh/xonsh/issues/5569
79       "test_spec_decorator_alias_output_format"
80     ];
82     disabledTestPaths = [
83       # fails on sandbox
84       "tests/completers/test_command_completers.py"
85       "tests/shell/test_ptk_highlight.py"
86       # fails on non-interactive shells
87       "tests/prompt/test_gitstatus.py"
88       "tests/completers/test_bash_completer.py"
89     ];
91     # https://github.com/NixOS/nixpkgs/issues/248978
92     dontWrapPythonPrograms = true;
94     env.LC_ALL = "en_US.UTF-8";
96     postPatch = ''
97       sed -ie 's|/bin/ls|${lib.getExe' coreutils "ls"}|' tests/test_execer.py
98       sed -ie 's|SHELL=xonsh|SHELL=$out/bin/xonsh|' tests/test_integrations.py
100       for script in tests/test_integrations.py scripts/xon.sh $(find -name "*.xsh"); do
101         sed -ie 's|/usr/bin/env|${lib.getExe' coreutils "env"}|' $script
102       done
103       patchShebangs .
104     '';
106     preCheck = ''
107       export HOME=$TMPDIR
108       export PATH=$out/bin:$PATH
109     '';
111     passthru = {
112       shellPath = "/bin/xonsh";
113       python = pythonPackages.python; # To the wrapper
114       wrapper = throw "The top-level xonsh package is now wrapped. Use it directly.";
115       updateScript = gitUpdater { };
116     };
118     meta = {
119       homepage = "https://xon.sh/";
120       description = "Python-ish, BASHwards-compatible shell";
121       changelog = "https://github.com/xonsh/xonsh/raw/main/CHANGELOG.rst";
122       license = with lib.licenses; [ bsd3 ];
123       mainProgram = "xonsh";
124       maintainers = with lib.maintainers; [ samlukeyes123 ];
125     };
126   };
128 pythonPackages.buildPythonPackage argset