devShell inputDerivation flake example

A number of topics reference as being the solution to how to build/cache/gc a shell environment, but as newcomer, I’m struggling to wire this up to a flake, where I don’t have an explicit shell.nix or mkShell invocation:

  outputs = { self, nixpkgs, nix-ros-overlay, flake-utils }:
    with flake-utils.lib;
    eachSystem allSystems (system: let
      pkgs = import nixpkgs {
        inherit system;
        overlays = [ nix-ros-overlay.overlay ];
    in {
      packages = pkgs.rosPackages;
      devShell = import ./ros-base.nix { inherit pkgs; rosPackages = pkgs.rosPackages;};
    }) // {
      nixosModule = import ./modules;

It doesn’t seem like I can just grab devShell.inputDerivation or devShell."${system}".inputDerivation. How do I manage this?

nix build .#devShell.x86_64-linux.inputDerivation

works for me

1 Like

Works perfectly, thanks for the assistance!