Derivation does not have wanted outputs 'dev,out'

After updating NixOS to the last unstable commit ( 39e6bf76474c ) when I try to use nix-shell with shell.nix like this simple one:

{ pkgs ? import <nixpkgs> {} }:
  pkgs.mkShell {
    buildInputs = with pkgs; [

  shellHook = ''
    echo "${pkgs.gtk3}"

I’m having errors like this:

$ nix-shell                                                                                                                                                                      
error: derivation '/nix/store/sh9jhpl605ylcjbwavwplgnmgpxnd2y7-gtk+3-3.24.27.drv' does not have wanted outputs 'dev,out'

If I remove the shellHook it works.

1 Like

I have the same issue. I worked around it by writing flakes and using nix develop .

Thanks @teto! With nix develop (and flakes) it works. I thinks this problem is related to this libstore/derivation-goal: don't raise an error if the only remaining output is a wildcard by Ma27 · Pull Request #4759 · NixOS/nix · GitHub

Fixed in Bump version number for `DerivedPath` changes by Ma27 · Pull Request #4763 · NixOS/nix · GitHub.

This should be fixed in Fix tokenize output names in DerivedPath by matthewbauer · Pull Request #4801 · NixOS/nix · GitHub

1 Like

Pull request in nixpkgs as well: nixUnstable: pre20210503_6d2553a -> pre20210513_340f831 by Mic92 · Pull Request #122794 · NixOS/nixpkgs · GitHub