From 85aef202df8b9767a5454392903e6afb8fa7c07d Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 16 Aug 2024 17:29:11 -0500 Subject: [PATCH] Update xonsh as best I can. --- flake.lock | 42 ++++++++------------------ flake.nix | 5 +-- home/modules/baseline/xonsh_header.xsh | 1 + modules/nixos/default.nix | 21 ++++++------- overlays/default.nix | 2 -- overlays/xonsh-apipenv.nix | 9 ++++-- 6 files changed, 34 insertions(+), 46 deletions(-) diff --git a/flake.lock b/flake.lock index 3732900..a210c7f 100644 --- a/flake.lock +++ b/flake.lock @@ -28,17 +28,18 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1723461092, - "narHash": "sha256-4Ouw2IqRut2uZUU7UPjtmx4FcpMUFXd7XcJxFtKErOI=", - "ref": "refs/heads/master", - "rev": "4ff5384b96c24919c2b4ac3d7c588db2f22a528a", - "revCount": 56, - "type": "git", - "url": "file:///home/greg/src/nur-packages" + "lastModified": 1723845581, + "narHash": "sha256-NmM1bhFtWiWrfFfRDCCRW9u9wu/2uX2qVPog7q8+zyI=", + "owner": "drmikecrowe", + "repo": "nur-packages", + "rev": "272d92f5b685c6e29db40b12c94ec856565da1cc", + "type": "github" }, "original": { - "type": "git", - "url": "file:///home/greg/src/nur-packages" + "owner": "drmikecrowe", + "ref": "overlay", + "repo": "nur-packages", + "type": "github" } }, "darwin": { @@ -304,11 +305,11 @@ ] }, "locked": { - "lastModified": 1722462338, - "narHash": "sha256-ss0G8t8RJVDewA3MyqgAlV951cWRK6EtVhVKEZ7J5LU=", + "lastModified": 1723399884, + "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e090576c4824b16e8759ebca3958c5b09659ee8", + "rev": "086f619dd991a4d355c07837448244029fc2d9ab", "type": "github" }, "original": { @@ -514,7 +515,6 @@ "nixunstable": "nixunstable", "nixvim": "nixvim", "nurpkgs": "nurpkgs", - "test": "test", "wsl": "wsl" } }, @@ -578,22 +578,6 @@ "type": "github" } }, - "test": { - "locked": { - "lastModified": 1723214923, - "narHash": "sha256-6RSkrFPjOzqhT6y3xxDtNkbDyunzqXVSygB9UDrG/P4=", - "owner": "SamLukeYes", - "repo": "nixpkgs", - "rev": "633da8f7a0a05aca42f6cc23e53523e18ce10a4f", - "type": "github" - }, - "original": { - "owner": "SamLukeYes", - "ref": "xonsh", - "repo": "nixpkgs", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index e90d8d5..143de34 100644 --- a/flake.nix +++ b/flake.nix @@ -32,12 +32,12 @@ inputs.nixpkgs.follows = "nixunstable"; }; - crowe.url = "/home/greg/src/nur-packages"; - test.url = "github:SamLukeYes/nixpkgs/xonsh"; + crowe.url = "github:drmikecrowe/nur-packages/overlay"; }; outputs = { agenix, + crowe, darwin, flake-utils, hm, @@ -61,6 +61,7 @@ pkg-sets local_overlay nurpkgs.overlay + crowe.overlays ]; in { diff --git a/home/modules/baseline/xonsh_header.xsh b/home/modules/baseline/xonsh_header.xsh index cb378ff..e88f91d 100644 --- a/home/modules/baseline/xonsh_header.xsh +++ b/home/modules/baseline/xonsh_header.xsh @@ -13,6 +13,7 @@ from sys import platform xontrib load direnv xontrib load coreutils +xontrib load xonsh-apipenv # Insert to the front, because when we spawn xonsh in tmux we have raw python3 # paths added before these. That ends up screwing with finding the python3 version diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 05f1485..64d3b0c 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -48,18 +48,17 @@ in { networkmanager.enable = true; }; - programs.xonsh = let - test = import inputs.test { - inherit (pkgs.stdenv) system; - overlays = [ inputs.self.overlays.default ]; - }; - in { + programs.xonsh = { enable = true; - package = (test.xonsh.override { - extraPackages = (ps: [ - ps.xonsh-apipenv - ps.xonsh-direnv - ps.xontrib-vox + package = (pkgs.xonsh.passthru.wrapper.override { + extraPackages = (ps: with ps; [ + (ps.toPythonModule pkgs.pipenv) + pyyaml + requests + ruamel-yaml + xonsh-apipenv + xonsh-direnv + xontrib-vox ]); }); }; diff --git a/overlays/default.nix b/overlays/default.nix index f7cf02d..9a7297c 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -38,8 +38,6 @@ in rec { graypy = cp ./graypy.nix {}; itg-django-utils = cp ./itg-django-utils.nix {}; xonsh-apipenv = cp ./xonsh-apipenv.nix {}; - xonsh-direnv = cp ./xonsh-direnv.nix {}; - xontrib-vox = cp ./xonsh-vox.nix {}; }) ]; diff --git a/overlays/xonsh-apipenv.nix b/overlays/xonsh-apipenv.nix index 0b5e2c0..7d6a667 100644 --- a/overlays/xonsh-apipenv.nix +++ b/overlays/xonsh-apipenv.nix @@ -1,4 +1,9 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pkgs}: +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pipenv, +}: buildPythonPackage rec { pname = "xonsh-apipenv"; @@ -20,7 +25,7 @@ buildPythonPackage rec { doCheck = false; - buildInputs = with pkgs; [ + dependencies = [ pipenv ];