New project to share and compose Nix devshells:

https://codeberg.org/rossabaker/shell-game/

I'm a fan of Numtide's devshells, but have struggled to fold my ad hoc definitions for unflaked projects into published devshells for my projects with flakes. This fixes it for me.

#Nix #Devshells #ShellGame

shell-game

Generic nix devshells for playing around

Codeberg.org
🚀 #NixOS + #Rust + #flakes + #devshells .
Video shows using Rust on NixOS, taking full advantage of flakes & devshells to make packaging programs for NixOS easier.
Nice for dealing with #nixpkgs / #nixospackages .
🎥 https://youtu.be/Ss1IXtYnpsg
#Linux #DevTools
#vimjoyer

Find why your devShell, package, etc depends on something interactively!

`nix-tree --derivation .#devShells.x86_64-linux.default`

https://github.com/utdemir/nix-tree

#Nix #NixFlakes #NixOS

GitHub - utdemir/nix-tree: Interactively browse dependency graphs of Nix derivations.

Interactively browse dependency graphs of Nix derivations. - utdemir/nix-tree

GitHub
@uep `nix-tree --derivation .#devShells.x86_64-linux.default` landed it. Jujutsu wants gnupg which wants openldap - because reasons I guess
@uep `nix why-depends .#devShells.x86_64-linux.default github:nixos/nixpkgs/nixpkgs-unstable#openldap` complains about the second argument not evaluating to one store path. I'm hoping it'll work off the `nixpkgs-unstable` branch, otherwise I can pull the `flake.lock` nixpkgs commit sha to make it line up exactly.
`nix derivation show .#devShells.x86_64-linux.default` yields some store paths from first-tier dependencies, maybe I use why-depends with those until I hit it?

Is there a way to see why a Flake DevShell depends on a given package easily?

`nix path-info -r .#devShells.x86_64-linux.default` seems obvious but no worky

#Nix #NixFlakes

A big shortcoming of #Nix #devshells is that it's difficult to wrap #editor & #LSP configs for your project.

This is the number one thing I would want a #devshell for after installing dependencies, rendering them always inadequate/incomplete.

@terrorjack (the creativity necessary to use a nix file is essentially `nix eval --json .#devShells.x86_64-linux.devShells.default --apply 'builtins.unsafeGetAttrPos "buildInputs"'`, shoving that position into your choice of nix parser such as rnix, then finding any list that's unconditionally added there and adding it)

(it's not *hard*, i just don't think anyone with the necessary knowledge has actually done it because they simply have other stuff to do)

@tristanC I'm not sure there's a tool for doing exactly what you're asking for yet (but it would be really nice to have and shouldn't be too hard to implement!), but nix-diff could be interesting for observing the changes in what you end up building. Apply nix-diff to the shell drv files before and after (nix eval .#devShells.x86_64-linux.default.drvPath) and it'll show you exactly what changed on the derivation level — so what's actually built.