From 8421b100dd93ef4daef5b58a9be1dd0115e1dfeb Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Mon, 20 Nov 2023 19:37:31 +0100 Subject: [PATCH] flake: Allow users to modify the dev shell Copy of xmonad/xmonad-contrib@f1ea1e533d431135b156a2e30a655427a7988a74 Documentation for this is already inside of contrib's NIX.md. Co-authored-by: Ivan Malison --- flake.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index bb88faf..6fd94c3 100644 --- a/flake.nix +++ b/flake.nix @@ -74,11 +74,15 @@ in flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system overlays; }; hpkg = pkgs.lib.attrsets.getAttrFromPath (hpath defComp) pkgs; + modifyDevShell = + if builtins.pathExists ./develop.nix + then import ./develop.nix + else _: x: x; in rec { - devShell = hpkg.shellFor { + devShell = hpkg.shellFor (modifyDevShell pkgs { packages = p: [ p.xmonad ]; - }; + }); defaultPackage = hpkg.xmonad; # An auxiliary NixOS module that modernises the standard xmonad NixOS module # and wrapper script used, replacing them with versions from unstable.