Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
Is there some way of, inside a Nix expression, observing whether it's nix-build or nix-shell that's running? I want to have a few extra packages available in my Nix shell, but they're not necessary for building.
nix-build
nix-shell
nix-repl> (import <nixpkgs> {}).lib.inNixShell false
Is there some way of, inside a Nix expression, observing whether it's
nix-build
ornix-shell
that's running?I want to have a few extra packages available in my Nix shell, but they're not necessary for building.
nix-repl> (import <nixpkgs> {}).lib.inNixShell
false