Skip to content

Commit

Permalink
imp: prep for multiple devshell profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Feb 2, 2022
1 parent 10ad976 commit e5689f5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
41 changes: 22 additions & 19 deletions cells/std/devshellProfiles.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,28 @@ let
std = inputs.self.cli.${ system.host.system }.std;
nixpkgs = inputs.nixpkgs;
in
{ config
, ...
}:
{
options.cellsFrom =
nixpkgs.lib.mkOption
{
type = nixpkgs.lib.types.str;
default = "./cells";
defaultText = "./cells";
description = "folder relative to the repo root at which to find the cells (required env variable for std cli)";
"" =
{ config
, ...
}:
{
options.cellsFrom =
nixpkgs.lib.mkOption
{
type = nixpkgs.lib.types.str;
default = "./cells";
defaultText = "./cells";
description = "folder relative to the repo root at which to find the cells (required env variable for std cli)";
};
config = {
env = [
{
name = "CELL_ROOT";
eval = "$PRJ_ROOT/${config.cellsFrom}";
}
];
commands = [ { package = std; } ];
};
config = {
env = [
{
name = "CELL_ROOT";
eval = "$PRJ_ROOT/${config.cellsFrom}";
}
];
commands = [ { package = std; } ];
};
};
}
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
}
)
(runnables { o = "cli"; })
(functions { o = "devshellProfiles"; })
(functions { m = "devshellProfiles"; })
];
systems = [
{
Expand Down

0 comments on commit e5689f5

Please sign in to comment.