-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xonsh.xontribs.xontrib-*: init at various #354733
Open
Infinidoge
wants to merge
13
commits into
NixOS:master
Choose a base branch
from
Infinidoge:add_xontrib_pkgs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
79be389
nixos/xonsh: support extra packages
Infinidoge 3801dd7
xonsh: format
Infinidoge 7f06ed7
xonsh.xontribs: init empty package set
Infinidoge bea1a89
xonsh.xontribs.xonsh-direnv: init at 1.6.5
Infinidoge d3bac0a
xonsh.xontribs.xontrib-abbrevs: init at 0.1.0
Infinidoge 1830f93
xonsh.xontribs.xontrib-bashisms: init at 0.0.5
Infinidoge b7308c6
xonsh.xontribs.xontrib-debug-tools: init at 0.0.1
Infinidoge a8887de
xonsh.xontribs.xontrib-distributed: init at 0.0.4
Infinidoge b5c2aa9
xonsh.xontribs.xontrib-fish-completer: init at 0.0.1
Infinidoge 29e6e8f
xonsh.xontribs.xontrib-jedi: init at 0.1.1
Infinidoge 527a4fe
xonsh.xontribs.xontrib-jupyter: init at 0.3.2
Infinidoge c496c81
xonsh.xontribs.xontrib-vox: init at 0.0.1
Infinidoge 9936e83
xonsh.xontribs.xontrib-whole-word-jumping: init at 0.0.1
Infinidoge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
pythonPackages, | ||
}: | ||
let | ||
inherit (pythonPackages) callPackage; | ||
in | ||
{ | ||
xonsh-direnv = callPackage ./xonsh-direnv { }; | ||
xontrib-abbrevs = callPackage ./xontrib-abbrevs { }; | ||
xontrib-bashisms = callPackage ./xontrib-bashisms { }; | ||
xontrib-debug-tools = callPackage ./xontrib-debug-tools { }; | ||
xontrib-distributed = callPackage ./xontrib-distributed { }; | ||
xontrib-fish-completer = callPackage ./xontrib-fish-completer { }; | ||
xontrib-jedi = callPackage ./xontrib-jedi { }; | ||
xontrib-jupyter = callPackage ./xontrib-jupyter { }; | ||
xontrib-vox = callPackage ./xontrib-vox { }; | ||
xontrib-whole-word-jumping = callPackage ./xontrib-whole-word-jumping { }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
buildPythonPackage, | ||
lib, | ||
fetchFromGitHub, | ||
|
||
direnv, | ||
setuptools, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "xonsh-direnv"; | ||
version = "1.6.5"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "74th"; | ||
repo = pname; | ||
rev = version; | ||
hash = "sha256-huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU="; | ||
}; | ||
|
||
propagatedBuildInputs = [ | ||
direnv | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
setuptools | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Direnv support for Xonsh"; | ||
homepage = "https://github.com/74th/xonsh-direnv/"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ greg ]; | ||
}; | ||
} |
56 changes: 56 additions & 0 deletions
56
pkgs/by-name/xo/xonsh/xontribs/xontrib-abbrevs/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
buildPythonPackage, | ||
lib, | ||
fetchFromGitHub, | ||
|
||
setuptools, | ||
setuptools-scm, | ||
poetry-core, | ||
prompt-toolkit, | ||
pytestCheckHook, | ||
xonsh, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "xontrib-abbrevs"; | ||
version = "0.1.0"; | ||
format = "pyproject"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "xonsh"; | ||
repo = "xontrib-abbrevs"; | ||
rev = "v${version}"; | ||
hash = "sha256-JxH5b2ey99tvHXSUreU5r6fS8nko4RrS/1c8psNbJNc="; | ||
}; | ||
|
||
prePatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace '"xonsh>=0.12.5", ' "" | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
setuptools | ||
setuptools-scm | ||
poetry-core | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
prompt-toolkit | ||
]; | ||
|
||
preCheck = '' | ||
export HOME=$TMPDIR | ||
''; | ||
|
||
checkInputs = [ | ||
pytestCheckHook | ||
xonsh | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Command abbreviations. This expands input words as you type."; | ||
homepage = "https://github.com/xonsh/xontrib-abbrevs"; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.greg ]; | ||
}; | ||
} |
47 changes: 47 additions & 0 deletions
47
pkgs/by-name/xo/xonsh/xontribs/xontrib-bashisms/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
buildPythonPackage, | ||
lib, | ||
fetchFromGitHub, | ||
|
||
setuptools, | ||
pytestCheckHook, | ||
xonsh, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "xontrib-bashisms"; | ||
version = "0.0.5"; | ||
format = "pyproject"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "xonsh"; | ||
repo = "xontrib-bashisms"; | ||
rev = version; | ||
hash = "sha256-R1DCGMrRCJLnz/QMk6QB8ai4nx88vvyPdaCKg3od5/I="; | ||
}; | ||
|
||
prePatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace '"xonsh>=0.12.5"' "" | ||
''; | ||
|
||
preCheck = '' | ||
export HOME=$TMPDIR | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
setuptools | ||
]; | ||
|
||
checkInputs = [ | ||
pytestCheckHook | ||
xonsh | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Bash-like interactive mode extensions for the xonsh shell. "; | ||
homepage = "https://github.com/xonsh/xontrib-bashisms"; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.greg ]; | ||
}; | ||
} |
41 changes: 41 additions & 0 deletions
41
pkgs/by-name/xo/xonsh/xontribs/xontrib-debug-tools/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
buildPythonPackage, | ||
lib, | ||
fetchFromGitHub, | ||
|
||
pytestCheckHook, | ||
xonsh, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "xontrib-debug-tools"; | ||
version = "0.0.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "xonsh"; | ||
repo = "xontrib-debug-tools"; | ||
rev = version; | ||
hash = "sha256-Z8AXKk94NxmF5rO2OMZzNX0GIP/Vj+mOtYUaifRX1cw="; | ||
}; | ||
|
||
prePatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace '"xonsh>=0.12.5"' "" | ||
''; | ||
|
||
preCheck = '' | ||
export HOME=$TMPDIR | ||
''; | ||
|
||
checkInputs = [ | ||
pytestCheckHook | ||
xonsh | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Debug tools for xonsh shell."; | ||
homepage = "https://github.com/xonsh/xontrib-debug-tools"; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.greg ]; | ||
}; | ||
} |
51 changes: 51 additions & 0 deletions
51
pkgs/by-name/xo/xonsh/xontribs/xontrib-distributed/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
buildPythonPackage, | ||
lib, | ||
fetchFromGitHub, | ||
|
||
distributed, | ||
poetry-core, | ||
pytestCheckHook, | ||
xonsh, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "xontrib-distributed"; | ||
version = "0.0.4"; | ||
format = "pyproject"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "xonsh"; | ||
repo = "xontrib-distributed"; | ||
rev = "v${version}"; | ||
hash = "sha256-Hb7S3PqHi0w6zb9ki8ADMtgdYVv8O5WQZMgJzKF74qE="; | ||
}; | ||
|
||
prePatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace 'xonsh = ">=0.12"' "" | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
poetry-core | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
distributed | ||
]; | ||
|
||
# v0.0.4 has no tests associated with it | ||
doCheck = false; | ||
|
||
checkInputs = [ | ||
pytestCheckHook | ||
xonsh | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Dask Distributed integration for Xonsh"; | ||
homepage = "https://github.com/xonsh/xontrib-distributed"; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.greg ]; | ||
}; | ||
} |
47 changes: 47 additions & 0 deletions
47
pkgs/by-name/xo/xonsh/xontribs/xontrib-fish-completer/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
buildPythonPackage, | ||
lib, | ||
fetchFromGitHub, | ||
|
||
pytestCheckHook, | ||
pytest-subprocess, | ||
xonsh, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "xontrib-fish-completer"; | ||
version = "0.0.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "xonsh"; | ||
repo = "xontrib-fish-completer"; | ||
rev = version; | ||
hash = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA="; | ||
}; | ||
|
||
prePatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace '"xonsh>=0.12.5"' "" | ||
''; | ||
|
||
preCheck = '' | ||
export HOME=$TMPDIR | ||
''; | ||
|
||
disabledTests = [ | ||
"test_interpreter" | ||
]; | ||
|
||
checkInputs = [ | ||
pytestCheckHook | ||
pytest-subprocess | ||
xonsh | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Populate rich completions using fish and remove the default bash based completer"; | ||
homepage = "https://github.com/xonsh/xontrib-fish-completer"; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.greg ]; | ||
}; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to separate xontribs from other python packages? I think they can be both in one option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was addressed in the review of my original PR. Xontribs are intentionally hobbled code and do not need to exclusively be written in Python (they can also be written in Xonsh syntax itself). Rather than using the established methods for Python plugin detection, Xonsh requires that its plugins all drop their entry point into the same folder and leave out the
__init__.py
file. Xonsh itself provides that init file and then looks for the xontribs in that directory. As such, xontribs are not truly valid Python packages and really shouldn't be handled as such.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Xontribs and Python packages are both added to the wrapper's parameter
extraPackages
now and works fine so far for me, so I don't understand why there are two options to overrideextraPackages
. Do you mean the wrapper needs rework?