flake: make default devshell work for traditional nix-shell

This commit is contained in:
Gabriel Arazas 2024-02-08 11:21:38 +08:00
parent 5e7481b898
commit cd456823f3
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 10 additions and 6 deletions

View File

@ -31,7 +31,14 @@
# more preferable than installing all of the packages at the system # more preferable than installing all of the packages at the system
# configuration (or even home environment). # configuration (or even home environment).
devShells = import ../../shells { inherit pkgs; } // { 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; }; docs = import ../../docs/shell.nix { inherit pkgs; };
}; };
}; };

View File

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> { } }: { pkgs ? import <nixpkgs> { }, extraPackages ? [ ] }:
pkgs.mkShell { pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
@ -26,8 +26,5 @@ pkgs.mkShell {
stylua # ...for Lua. stylua # ...for Lua.
black # ...for Python. black # ...for Python.
nixpkgs-fmt # ...for Nix. nixpkgs-fmt # ...for Nix.
] ++ extraPackages;
# Mozilla addons-specific tooling.
nur.repos.rycee.mozilla-addons-to-nix
];
} }