Skip to content

dev env vs CI env #236

Answered by zimbatm
tomdavidson asked this question in General
Dec 2, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Good question!

One way is to split the devshell in two:

{
  inputs.devshell.url = "github:numtide/devshell";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { self, flake-utils, devshell, nixpkgs }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;

          overlays = [ devshell.overlay ];
        };
      in
     {
      devShells.default = pkgs.devshell.mkShell {
        imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
      };
      devShells.ci = pkgs.devshell.mkShell {
        imports = [ (pkgs.devshell.importTOML ./devshell-ci.toml) ];
      }
    });
}

Then use nix develop for developm…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by tomdavidson
Comment options

You must be logged in to vote
1 reply
@zimbatm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants