NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.91k stars 1.53k forks source link

error: bashInteractive should evaluate to one store path #6500

Open Artturin opened 2 years ago

Artturin commented 2 years ago
$ nix why-depends nixpkgs#bashInteractive nixpkgs#bashInteractive
error: argument 'flake:nixpkgs#bashInteractive' should evaluate to one store path
$ nix develop "nixpkgs#bash" -vvvvvvvvvv
acquiring write lock on '/nix/var/nix/temproots/1434191'
using cache entry '{"name":"flake-registry.json","type":"file","url":"https://github.com/NixOS/flake-registry/raw/master/flake-registry.json"}' -> '{"etag":"\"564d090d74902f400d5bab0c93c448b8fb904dd4f794b41125c02bf206e0c296\"","url":"https://raw.githubusercontent.com/NixOS/flake-registry/master/flake-registry.json"}', '/nix/store/4ifmmdjf22r8ibj9wr6fgrzn7baw7j4r-flake-registry.json'
looked up 'flake:nixpkgs' -> 'github:NixOS/nixpkgs/b6966d911da89e5a7301aaef8b4f0a44c77e103c'
using substituted/cached input 'github:NixOS/nixpkgs/b6966d911da89e5a7301aaef8b4f0a44c77e103c' in '/nix/store/gyzqxklnmyzl773qpqylnfvhg6gimyad-source'
got tree '/nix/store/gyzqxklnmyzl773qpqylnfvhg6gimyad-source' from 'github:NixOS/nixpkgs/b6966d911da89e5a7301aaef8b4f0a44c77e103c'
checking access to '/nix/store/gyzqxklnmyzl773qpqylnfvhg6gimyad-source/flake.nix'
evaluating file '/nix/store/gyzqxklnmyzl773qpqylnfvhg6gimyad-source/flake.nix'
old lock file: {
  "nodes": {
    "root": {}
  },
  "root": "root",
  "version": 7
}
computing lock file node ''
new lock file: {
  "nodes": {
    "root": {}
  },
  "root": "root",
  "version": 7
}
trying flake output attribute 'devShells.x86_64-linux.bash'
using cached attrset attribute ''
trying flake output attribute 'packages.x86_64-linux.bash'
using cached attrset attribute ''
trying flake output attribute 'legacyPackages.x86_64-linux.bash'
using cached string attribute 'legacyPackages.x86_64-linux.bash.type'
using cached string attribute 'legacyPackages.x86_64-linux.bash.drvPath'
using cached list of strings attribute 'legacyPackages.x86_64-linux.bash.meta.outputsToInstall'
building of '/nix/store/b8xj921hrh5gd8pvl5slbwl81zcdjkk8-bash-5.1-p16-env.drv!*' from .drv file: created
building of '/nix/store/b8xj921hrh5gd8pvl5slbwl81zcdjkk8-bash-5.1-p16-env.drv!*' from .drv file: woken up
querying info about missing paths...
starting pool of 24 threads
entered goal loop
building of '/nix/store/b8xj921hrh5gd8pvl5slbwl81zcdjkk8-bash-5.1-p16-env.drv!*' from .drv file: init
building of '/nix/store/b8xj921hrh5gd8pvl5slbwl81zcdjkk8-bash-5.1-p16-env.drv!*' from .drv file: loading derivation
building of '/nix/store/b8xj921hrh5gd8pvl5slbwl81zcdjkk8-bash-5.1-p16-env.drv!*' from .drv file: have derivation
building of '/nix/store/b8xj921hrh5gd8pvl5slbwl81zcdjkk8-bash-5.1-p16-env.drv!*' from .drv file: done
building of '/nix/store/b8xj921hrh5gd8pvl5slbwl81zcdjkk8-bash-5.1-p16-env.drv!*' from .drv file: goal destroyed
reading environment file '/nix/store/9835hg996mcg11l4yzf5zy3n9jqlf1n8-bash-5.1-p16-env'
looked up 'flake:nixpkgs' -> 'github:NixOS/nixpkgs/b6966d911da89e5a7301aaef8b4f0a44c77e103c'
using substituted/cached input 'github:NixOS/nixpkgs/b6966d911da89e5a7301aaef8b4f0a44c77e103c' in '/nix/store/gyzqxklnmyzl773qpqylnfvhg6gimyad-source'
got tree '/nix/store/gyzqxklnmyzl773qpqylnfvhg6gimyad-source' from 'github:NixOS/nixpkgs/b6966d911da89e5a7301aaef8b4f0a44c77e103c'
old lock file: {
  "nodes": {
    "root": {}
  },
  "root": "root",
  "version": 7
}
computing lock file node ''
new lock file: {
  "nodes": {
    "root": {}
  },
  "root": "root",
  "version": 7
}
trying flake output attribute 'legacyPackages.x86_64-linux.bashInteractive'
using cached string attribute 'legacyPackages.x86_64-linux.bashInteractive.type'
using cached string attribute 'legacyPackages.x86_64-linux.bashInteractive.drvPath'
using cached list of strings attribute 'legacyPackages.x86_64-linux.bashInteractive.meta.outputsToInstall'
building of '/nix/store/v01cx1hmip6vgv7xdiva2jij7wf2spyz-bash-interactive-5.1-p16.drv!man,out' from .drv file: created
building of '/nix/store/v01cx1hmip6vgv7xdiva2jij7wf2spyz-bash-interactive-5.1-p16.drv!man,out' from .drv file: woken up
querying info about missing paths...
starting pool of 24 threads
entered goal loop
building of '/nix/store/v01cx1hmip6vgv7xdiva2jij7wf2spyz-bash-interactive-5.1-p16.drv!man,out' from .drv file: init
building of '/nix/store/v01cx1hmip6vgv7xdiva2jij7wf2spyz-bash-interactive-5.1-p16.drv!man,out' from .drv file: loading derivation
building of '/nix/store/v01cx1hmip6vgv7xdiva2jij7wf2spyz-bash-interactive-5.1-p16.drv!man,out' from .drv file: have derivation
building of '/nix/store/v01cx1hmip6vgv7xdiva2jij7wf2spyz-bash-interactive-5.1-p16.drv!man,out' from .drv file: done
building of '/nix/store/v01cx1hmip6vgv7xdiva2jij7wf2spyz-bash-interactive-5.1-p16.drv!man,out' from .drv file: goal destroyed
error (ignored): error: argument 'flake:nixpkgs#bashInteractive' should evaluate to one store path
+ command rm -f /tmp/nix-shell.7BHm8M
alexshpilkin commented 2 years ago

Can confirm that this, too, breaks in exactly the same way on master and on https://github.com/NixOS/nix/commit/404c222444b4c8c60148ccf890cd41611f26b0a0 (merge of #6426) yet works on https://github.com/NixOS/nix/commit/cae7473884d358e4c106f333684f4f771dddc1e2 (just before merge).

alexshpilkin commented 2 years ago

I think these are two separate issues:

Artturin commented 2 years ago
$ nix why-depends ".#sway-unwrapped" ".#xorg.libxcb" --all --precise
error: argument 'git+file:///home/artturin/nixgits/my-nixpkgs#xorg.libxcb' should evaluate to one store path

$ nix why-depends ".#sway-unwrapped" ".#xorg.libxcb^dev" --all --precise
/nix/store/qnr0nyczahljj1n7djvbbc0573s0lai9-sway-unwrapped-1.7
└───bin/sway: …-libinput-1.20.1/lib:/nix/store/dfk67dlnhfd0l4b7yv204j6vl6xy73d7-wlroots-0.15.1/lib:/nix/store/m…
    → /nix/store/dfk67dlnhfd0l4b7yv204j6vl6xy73d7-wlroots-0.15.1
    └───lib/libwlroots.so.10: …cb-util-wm-0.4.1/lib:/nix/store/0wlvm44fyr6da539fafs1y3l315ifh22-xcb-util-errors-1.0/lib:/nix/st…
        → /nix/store/0wlvm44fyr6da539fafs1y3l315ifh22-xcb-util-errors-1.0
        └───nix-support/propagated-build-inputs: …/nix/store/sl59xf3jpvynkxbvmvf2g4kyyijrr14v-libxcb-1.14-dev …
            → /nix/store/sl59xf3jpvynkxbvmvf2g4kyyijrr14v-libxcb-1.14-dev

a better error message would be nice

nixos-discourse commented 2 years ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-30/19112/1