1
0
forked from clan/clan-core

devShells: make all shells inherit from default shell

Currently, important tools from the default shell are lost as soon as select-shell is used to switch to another shell. select-shell itself, for example is missing, which makes it impossible to switch back to another shell.
This commit is contained in:
DavHau 2024-07-05 15:00:13 +07:00
parent a89b301425
commit 802f047341
8 changed files with 36 additions and 7 deletions

View File

@ -74,9 +74,12 @@
{
devShells.docs = pkgs.callPackage ./shell.nix {
inherit (self'.packages) docs clan-cli-docs;
inherit module-docs;
inherit asciinema-player-js;
inherit asciinema-player-css;
inherit
asciinema-player-js
asciinema-player-css
module-docs
self'
;
};
packages = {
docs = pkgs.python3.pkgs.callPackage ./default.nix {

View File

@ -7,10 +7,14 @@
asciinema-player-css,
roboto,
fira-code,
self',
...
}:
pkgs.mkShell {
inputsFrom = [ docs ];
inputsFrom = [
docs
self'.devShells.default
];
shellHook = ''
mkdir -p ./site/reference/cli
cp -af ${module-docs}/* ./site/reference/

View File

@ -13,6 +13,7 @@ in
lib,
config,
system,
self',
...
}:
let
@ -26,6 +27,7 @@ in
inputsFrom = with config.checks; [
lib-inventory-schema
lib-inventory-eval
self'.devShells.default
];
};

View File

@ -6,6 +6,7 @@
pkgs,
lib,
system,
self',
...
}:
if lib.elem system lib.platforms.darwin then
@ -14,6 +15,7 @@
{
devShells.clan-app = pkgs.callPackage ./shell.nix {
inherit (config.packages) clan-app webview-ui;
inherit self';
};
packages.clan-app = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (config.packages) clan-cli webview-ui;

View File

@ -11,6 +11,7 @@
gtk4,
libadwaita,
webview-ui,
self',
}:
let
@ -27,6 +28,9 @@ let
in
mkShell {
inherit (clan-app) nativeBuildInputs;
inputsFrom = [ self'.devShells.default ];
buildInputs =
[
ruff

View File

@ -39,7 +39,10 @@
in
{
devShells.clan-cli = pkgs.callPackage ./shell.nix { inherit (self'.packages) clan-cli; };
devShells.clan-cli = pkgs.callPackage ./shell.nix {
inherit (self'.packages) clan-cli;
inherit self';
};
packages = {
clan-cli = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (inputs) nixpkgs;

View File

@ -4,6 +4,7 @@
mkShell,
ruff,
python3,
self',
}:
let
devshellTestDeps =
@ -22,6 +23,8 @@ mkShell {
ruff
] ++ devshellTestDeps;
inputsFrom = [ self'.devShells.default ];
PYTHONBREAKPOINT = "ipdb.set_trace";
shellHook = ''

View File

@ -1,7 +1,12 @@
{ ... }:
{
perSystem =
{ pkgs, config, ... }:
{
pkgs,
config,
self',
...
}:
{
packages.webview-ui = pkgs.buildNpmPackage {
pname = "clan-webview-ui";
@ -22,7 +27,10 @@
'';
};
devShells.webview-ui = pkgs.mkShell {
inputsFrom = [ config.packages.webview-ui ];
inputsFrom = [
config.packages.webview-ui
self'.devShells.default
];
shellHook = ''
mkdir -p ./app/api
cat ${config.packages.clan-ts-api} > ./app/api/index.ts