• rozodru@piefed.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      18 hours ago

      ain’t really needed and it’s kinda redundant.

      plus Nix Develop is just easier/cleaner IMHO. like for example you want to build suckless stuff like ST, dmenu, or DWM. it’s easier to just slap a nix develop .#suckless in your flake with all the required devels and libs and what have you that way you can just enter it, build whatever you want, and then you’re done and dusted. but keep in mind for that stuff IF you want to install it you want to package it anyways because GC will delete it eventually.

      • kuerbiskernoel@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 hour ago

        Thanks!

        But devshells are only to be declared in the system’s flake.nix, right?

        I’m currently using dev shells for personal projects and nix shells for shared projects (saving the shell.nix files directly at the project root so others have them too). Either way activating them with direnv.

        But I think in practice it makes no difference? I didn’t notice any difference so far.

    • tetov@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      4
      ·
      21 hours ago

      From the video: Run nix develop .#your-package or just nix develop if your package is outputs.packages.${system}.default.

      My comment: This assumes flakes and that you don’t want devtools like treefmt or something else not included in the package. (in that case use mkShell with inputsFrom = [self.packages.${system}.your-package). If you don’t use flakes you can use nix develop -f . your-package (if you have a default.nix providing the attr your-package.