From cd456823f333fb1d2bd8e997adbfa57846f0aa63 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Thu, 8 Feb 2024 11:21:38 +0800 Subject: [PATCH] flake: make default devshell work for traditional nix-shell --- configs/flake-parts/dev.nix | 9 ++++++++- shell.nix | 7 ++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/configs/flake-parts/dev.nix b/configs/flake-parts/dev.nix index ab20fb8a..201231a6 100644 --- a/configs/flake-parts/dev.nix +++ b/configs/flake-parts/dev.nix @@ -31,7 +31,14 @@ # more preferable than installing all of the packages at the system # configuration (or even home environment). devShells = import ../../shells { inherit pkgs; } // { - default = import ../../shell.nix { inherit pkgs; }; + default = import ../../shell.nix { + inherit pkgs; + extraPackages = with pkgs; [ + # Mozilla addons-specific tooling. Unfortunately, only available with + # flakes-based setups. + nur.repos.rycee.mozilla-addons-to-nix + ]; + }; docs = import ../../docs/shell.nix { inherit pkgs; }; }; }; diff --git a/shell.nix b/shell.nix index 9feb1a4b..cad00d03 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ pkgs ? import { } }: +{ pkgs ? import { }, extraPackages ? [ ] }: pkgs.mkShell { packages = with pkgs; [ @@ -26,8 +26,5 @@ pkgs.mkShell { stylua # ...for Lua. black # ...for Python. nixpkgs-fmt # ...for Nix. - - # Mozilla addons-specific tooling. - nur.repos.rycee.mozilla-addons-to-nix - ]; + ] ++ extraPackages; }