Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: bashInteractive should evaluate to one store path #6500

Open
Artturin opened this issue May 6, 2022 · 4 comments
Open

error: bashInteractive should evaluate to one store path #6500

Artturin opened this issue May 6, 2022 · 4 comments
Labels
bug nix-shell nix-shell, nix develop, nix print-dev-env, etc stale

Comments

@Artturin
Copy link
Member

Artturin commented May 6, 2022

$ 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
@Artturin Artturin added the bug label May 6, 2022
@Artturin Artturin changed the title bashInteractive should evaluate to one store path error: bashInteractive should evaluate to one store path May 6, 2022
@alexshpilkin
Copy link
Member

Can confirm that this, too, breaks in exactly the same way on master and on 404c222 (merge of #6426) yet works on cae7473 (just before merge).

@alexshpilkin
Copy link
Member

alexshpilkin commented May 7, 2022

I think these are two separate issues:

  • In a multiple-outputs world, it doesn’t really make sense to blandly ask nix why-depends nixpkgs#foo^bar,baz nixpkgs#spam^bacon,eggs does it? Which of the four possible dependencies should Nix explain? Yet this is exactly the sort of question being asked here. This merits a doc change IMO; the underlying reality of outputs is leaking from the concept of installables. I would actually also suggest defining this question to mean “why do I get either spam^bacon or spam^eggs when I install both foo^bar and foo^baz?”, but this needs careful thought (@edolstra?). All in all, an unpleasant implication of the recent changes, but not an implementation bug.
  • On the other hand, nix develop is just straightforwardly broken, but given Allow selecting derivation outputs #6449 fixing it should be a one-line change. Stay tuned.

@Artturin
Copy link
Member Author

Artturin commented May 8, 2022

$ 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
Copy link

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

@stale stale bot added the stale label Nov 12, 2022
@roberth roberth added the nix-shell nix-shell, nix develop, nix print-dev-env, etc label Dec 19, 2022
@stale stale bot removed the stale label Dec 19, 2022
@stale stale bot added the stale label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug nix-shell nix-shell, nix develop, nix print-dev-env, etc stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants