File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,14 @@ in {
167
167
'' ;
168
168
} ;
169
169
170
+ enableXonshIntegration = mkOption {
171
+ default = true ;
172
+ type = types . bool ;
173
+ description = ''
174
+ Whether to enable Xonsh integration.
175
+ '' ;
176
+ } ;
177
+
170
178
enableFishIntegration = mkOption {
171
179
default = true ;
172
180
type = types . bool ;
@@ -237,5 +245,27 @@ in {
237
245
238
246
programs . nushell . extraConfig =
239
247
mkIf cfg . enableNushellIntegration ( shellInit "nushell" ) ;
248
+
249
+ programs . xonsh = mkIf cfg . enableXonshIntegration {
250
+ xonshrc = "xontrib load broot" ;
251
+ extraPackages = ps :
252
+ [
253
+ ( ps . buildPythonPackage rec {
254
+ name = "xontrib-broot" ;
255
+ src = pkgs . fetchFromGitHub {
256
+ owner = "jnoortheen " ;
257
+ repo = name ;
258
+ rev = "6f658ff88aba27b921017297d8c2c3dfb2ffa332" ;
259
+ hash = "sha256-9GqsTVCMvrWpTopHtEdicTyYRQzP1NVtQHZsfBT+fUg=" ;
260
+ } ;
261
+ pyproject = true ;
262
+ nativeBuildInputs = [ ps . setuptools ps . pdm-pep517 ] ;
263
+ postPatch = ''
264
+ substituteInPlace xontrib/broot.py --replace '"broot"' '"${ cfg . package } /bin/broot"'
265
+ sed 's/dependencies = [[].*[]]//' < pyproject.toml > pyproject.toml
266
+ '' ;
267
+ } )
268
+ ] ;
269
+ } ;
240
270
} ;
241
271
}
You can’t perform that action at this time.
0 commit comments