numtide / devshell

Per project developer environments
https://numtide.github.io/devshell/
MIT License
1.18k stars 86 forks source link

Update docs and flake #289

Closed deemp closed 6 months ago

deemp commented 6 months ago

Previously: part of #288

zimbatm commented 6 months ago

thanks!

sigprof commented 6 months ago

Before this change it was possible to use the devshell flake without overlays (#162, #165):

    devshell.inputs.nixpkgs.follows = "nixpkgs";
          devShells.default = inputs.devshell.legacyPackages.${system}.mkShell {
            # ... configuration ...
          };

But this PR removed legacyPackages. What would be the proper way to use the devshell flake without overlays now?

The following works, but looks like a hack due to the non-flake import (and the inputs and nixpkgs arguments for default.nix don't seem to be documented):

          devshell = import inputs.devshell {
            inherit system;
            inputs = null;
            nixpkgs = inputs.nixpkgs.legacyPackages.${system};
          };
          devShells.default = devshell.mkShell {
            # ... configuration ...
          };

Is migrating to flake-parts the only supported way forward?

deemp commented 6 months ago

Thank you! It's a regression. The only way is to restore legacyPackages. I'll make a PR