Fix infinite recursion with pkgs.devshell.mkShell
This commit is contained in:
parent
aa428101e8
commit
f74ffebc23
|
@ -12,20 +12,8 @@
|
||||||
"x86_64-darwin"
|
"x86_64-darwin"
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
]
|
]
|
||||||
(system:
|
(
|
||||||
let
|
system:
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
devshellModules.tritonshell = { config, lib, ... }: {
|
|
||||||
options.environment = {
|
|
||||||
enable = lib.mkEnableOption "environment";
|
|
||||||
# TODO: add real config here
|
|
||||||
};
|
|
||||||
config =
|
|
||||||
# TODO: set some devshell config here, like add a new command
|
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
@ -35,21 +23,15 @@
|
||||||
(import ./overlay.nix)
|
(import ./overlay.nix)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# HINT: add your extra devshell pkgs here, use any packages you want
|
|
||||||
# available in your devshell's PATH
|
|
||||||
# Use https://search.nixos.org/packages to find available packages
|
|
||||||
# in the unstable channel
|
|
||||||
# These get appended to devshell.packages in ./tritonshell.nix
|
|
||||||
extraDevshellPkgs = with pkgs; [
|
|
||||||
#hello
|
|
||||||
];
|
|
||||||
|
|
||||||
in
|
in
|
||||||
lib.optionalAttrs config.environment.enable {
|
{
|
||||||
devShells.default =
|
devshellModules.tritonshell = { config, lib, ... }: {
|
||||||
(import ./tritonshell.nix { inherit extraDevshellPkgs devshell pkgs self system; });
|
options.environment = {
|
||||||
|
enable = lib.mkEnableOption "triton DevOps shell environment";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config =
|
||||||
|
lib.mkIf config.environment.enable (import ./tritonshell.nix { inherit devshell pkgs self system; });
|
||||||
};
|
};
|
||||||
# Internal utility package with shell function and env vars helper.
|
# Internal utility package with shell function and env vars helper.
|
||||||
# These get source'd in devshell.bash.extra when starting tritonshell
|
# These get source'd in devshell.bash.extra when starting tritonshell
|
||||||
|
@ -70,5 +52,6 @@
|
||||||
inherit pkgs cnsBaseDomain dataCenters mantaDomain tritonApiDomain;
|
inherit pkgs cnsBaseDomain dataCenters mantaDomain tritonApiDomain;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ extraDevshellPkgs, devshell, pkgs, self, system, ... }:
|
{ devshell, pkgs, self, system, ... }:
|
||||||
pkgs.devshell.mkShell {
|
{
|
||||||
# devshell docs: https://numtide.github.io/devshell/modules_schema.html
|
# devshell docs: https://numtide.github.io/devshell/modules_schema.html
|
||||||
name = "tritonshell";
|
name = "tritonshell";
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ pkgs.devshell.mkShell {
|
||||||
# useful for working with JSON data
|
# useful for working with JSON data
|
||||||
jq
|
jq
|
||||||
bunyan-rs
|
bunyan-rs
|
||||||
] ++ extraDevshellPkgs;
|
];
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
# workaround for TLS certs bug in docker-compose, CERTIFICATE_VERIFY_FAILED
|
# workaround for TLS certs bug in docker-compose, CERTIFICATE_VERIFY_FAILED
|
||||||
|
|
Loading…
Reference in a new issue