From b65c466fd621af122d71170d3295b9a1ec8f9247 Mon Sep 17 00:00:00 2001 From: cswimr Date: Thu, 28 Nov 2024 14:44:07 -0500 Subject: [PATCH] add `xontrib-clp` --- nixos/shell.nix | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/nixos/shell.nix b/nixos/shell.nix index 3014296..8127f6e 100644 --- a/nixos/shell.nix +++ b/nixos/shell.nix @@ -2,7 +2,8 @@ #TODO: Submit a PR to nixpkgs to add xonsh support to the Starship module # After that, we can remove this import and the disabledModules line disabledModules = [ "programs/starship.nix" ]; - imports = [ /bulk/home/cswimr/Projects/nixpkgs/nixos/modules/programs/starship.nix ]; + imports = + [ /bulk/home/cswimr/Projects/nixpkgs/nixos/modules/programs/starship.nix ]; # starship - a customizable prompt for any shell programs.starship = { @@ -73,12 +74,16 @@ enable = true; config = '' $BASH_COMPLETIONS = ('${bashcfg.completion.package}/etc/profile.d/bash_completion.sh') + $UPDATE_OS_ENVIRON = True + $XONTRIB_CLP_ALIAS = 'shutil' #xontrib load cd + xontrib load clp xontrib load direnv xontrib load sh ''; package = pkgs.xonsh.override { extraPackages = ps: [ + pkgs.python311Packages.rich # (ps.buildPythonPackage rec { # name = "xontrib-cd"; # version = "0.3.1"; @@ -98,6 +103,25 @@ # maintainers = [ "cswimr" ]; # }; # }) + (ps.buildPythonPackage rec { + name = "xontrib-clp"; + version = "0.1.7"; + + src = pkgs.fetchFromGitHub { + owner = "anki-code"; + repo = name; + rev = version; + sha256 = "1ewWlwG8KY9s6qydErurvP2x+4DIPTFcjSGP1c5y83M="; + }; + + meta = { + homepage = "https://github.com/anki-code/xontrib-clp"; + description = + "Copy output to clipboard. Cross-platform."; + license = pkgs.lib.licenses.mit; + maintainers = [ "cswimr" ]; + }; + }) (ps.buildPythonPackage rec { name = "xonsh-direnv"; version = "1.6.5";