Nixpkgs version
Describe the bug
I have aliases disabled on my system, so pkgs.opencv3 just doesn't exist anymore. When trying to evaluate haskellPackages.opencv.buildInputs, the evaluation fails:
nix-repl> haskellPackages.opencv.buildInputs
error:
… while evaluating the attribute 'opencv.buildInputs'
at /home/puna/Development/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:590:13:
589| depsHostHost = elemAt (elemAt dependencies 1) 0;
590| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
591| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
… while calling the 'elemAt' builtin
at /home/puna/Development/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:590:27:
589| depsHostHost = elemAt (elemAt dependencies 1) 0;
590| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
591| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'opencv3' missing
at /home/puna/Development/nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix:492098:22:
492097| }
492098| ) { inherit (pkgs) opencv3; };
| ^
492099|
Did you mean one of opencv, opencv4, opencbm, opencc or opencpn?
I'm not sure why nixpkgs-review is choosing to evaluate this despite the derivation being meta.broken…
Steps to reproduce
I hit this while trying to nixpkgs-review #438979 with local evaluation. Evaluating haskellPackages.opencv.buildInputs with aliases disabled achieves the same error.
Expected behaviour
We don't like to rely on aliases in Nixpkgs. It would be nice if this still evaluated, even if it's long-term broken & waiting for a bump from upstream.
Screenshots
No response
Relevant log output
Local evaluation for computing rebuilds
$ nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f <nixpkgs> --nix-path nixpkgs=/home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs nixpkgs-overlays=/tmp/tmp_onhbbeq -qaP --xml --out-path --show-trace --no-allow-import-from-derivation
error:
… while querying the derivation named 'opencv-0.0.2.1'
… while calling the 'getAttr' builtin
at <nix/derivation-internal.nix>:50:17:
49| value = commonAttrs // {
50| outPath = builtins.getAttr outputName strict;
| ^
51| drvPath = strict.drvPath;
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'opencv-0.0.2.1'
whose name attribute is located at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:538:13
… while evaluating attribute 'buildInputs' of derivation 'opencv-0.0.2.1'
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:590:13:
589| depsHostHost = elemAt (elemAt dependencies 1) 0;
590| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
591| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
… while calling the 'elemAt' builtin
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:590:27:
589| depsHostHost = elemAt (elemAt dependencies 1) 0;
590| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
591| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
… while calling the 'map' builtin
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:500:14:
499| (map (drv: getDev drv.__spliced.hostHost or drv) (checkDependencyList "depsHostHost" depsHostHost))
500| (map (drv: getDev drv.__spliced.hostTarget or drv) (checkDependencyList "buildInputs" buildInputs'))
| ^
501| ]
… from call site
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:500:65:
499| (map (drv: getDev drv.__spliced.hostHost or drv) (checkDependencyList "depsHostHost" depsHostHost))
500| (map (drv: getDev drv.__spliced.hostTarget or drv) (checkDependencyList "buildInputs" buildInputs'))
| ^
501| ]
… while calling 'checkDependencyList''
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:446:26:
445| checkDependencyList' =
446| positions: name: deps:
| ^
447| imap1 (
… from call site
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:447:9:
446| positions: name: deps:
447| imap1 (
| ^
448| index: dep:
… while calling 'imap1'
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/lib/lists.nix:345:14:
344| */
345| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
346|
… while calling the 'genList' builtin
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/lib/lists.nix:345:20:
344| */
345| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
346|
… while evaluating the second argument passed to builtins.genList
… while calling the 'length' builtin
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/lib/lists.nix:345:60:
344| */
345| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
346|
… from call site
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:431:7:
430| if __propagatePkgConfigDepends then
431| propagatePlainBuildInputs allPkgconfigDepends'
| ^
432| else
… while calling 'propagatePlainBuildInputs'
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:405:9:
404| propagatePlainBuildInputs =
405| drvs:
| ^
406| builtins.map (i: i.val) (
… while calling the 'map' builtin
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:406:9:
405| drvs:
406| builtins.map (i: i.val) (
| ^
407| builtins.genericClosure {
… while calling the 'genericClosure' builtin
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:407:11:
406| builtins.map (i: i.val) (
407| builtins.genericClosure {
| ^
408| startSet = builtins.map (drv: {
… while calling the 'map' builtin
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:408:24:
407| builtins.genericClosure {
408| startSet = builtins.map (drv: {
| ^
409| key = drv.outPath;
… while calling the 'filter' builtin
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:411:17:
410| val = drv;
411| }) (builtins.filter propagateValue drvs);
| ^
412| operator =
… while calling 'propagateValue'
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:399:9:
398| propagateValue =
399| drv: lib.isDerivation drv && (__onlyPropagateKnownPkgConfigModules -> drv ? meta.pkgConfigModules);
| ^
400|
… in the left operand of the AND (&&) operator
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:399:35:
398| propagateValue =
399| drv: lib.isDerivation drv && (__onlyPropagateKnownPkgConfigModules -> drv ? meta.pkgConfigModules);
| ^
400|
… from call site
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/generic-builder.nix:399:14:
398| propagateValue =
399| drv: lib.isDerivation drv && (__onlyPropagateKnownPkgConfigModules -> drv ? meta.pkgConfigModules);
| ^
400|
… while calling 'isDerivation'
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/lib/attrsets.nix:1298:18:
1297| */
1298| isDerivation = value: value.type or null == "derivation";
| ^
1299|
error: attribute 'opencv3' missing
at /home/puna/.cache/nixpkgs-review/pr-438979/nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix:492098:22:
492097| }
492098| ) { inherit (pkgs) opencv3; };
| ^
492099|
Did you mean one of opencv, opencv4, opencbm, opencc or opencpn?
https://github.com/NixOS/nixpkgs/pull/438979 failed to build: Failed to list packages: nix-env failed with exit code 1
Additional context
No response
System metadata
- system:
"x86_64-linux"
- host os:
Linux 6.16.0, NixOS, 25.11 (Xantusia), 25.11pre837094.94def634a204
- multi-user?:
yes
- sandbox:
yes
- version:
nix-env (Lix, like Nix) 2.91.3 System type: x86_64-linux Additional system types: i686-linux, powerpc64-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/puna/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/puna/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/puna/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/puna/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/store/wzvcw93ncl4cnw7062mn77q4ym2hmxb1-gnome-settings-daemon-48.1/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/77m0y0vy6hmvp7vndljl9005ynxhkvf9-lix-2.91.3/share
- channels(bt1cn):
"unstable"
- channels(root):
"nixos, nixos-25.05-25.05, unstable"
- nixpkgs:
/nix/var/nix/profiles/per-user/root/channels/nixos
Notify maintainers
@NixOS/haskell
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Nixpkgs version
Describe the bug
I have aliases disabled on my system, so
pkgs.opencv3just doesn't exist anymore. When trying to evaluatehaskellPackages.opencv.buildInputs, the evaluation fails:I'm not sure why
nixpkgs-reviewis choosing to evaluate this despite the derivation beingmeta.broken…Steps to reproduce
I hit this while trying to
nixpkgs-review#438979 with local evaluation. EvaluatinghaskellPackages.opencv.buildInputswith aliases disabled achieves the same error.Expected behaviour
We don't like to rely on aliases in Nixpkgs. It would be nice if this still evaluated, even if it's long-term broken & waiting for a bump from upstream.
Screenshots
No response
Relevant log output
Additional context
No response
System metadata
"x86_64-linux"Linux 6.16.0, NixOS, 25.11 (Xantusia), 25.11pre837094.94def634a204yesyesnix-env (Lix, like Nix) 2.91.3 System type: x86_64-linux Additional system types: i686-linux, powerpc64-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/puna/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/puna/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/puna/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/puna/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/store/wzvcw93ncl4cnw7062mn77q4ym2hmxb1-gnome-settings-daemon-48.1/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/77m0y0vy6hmvp7vndljl9005ynxhkvf9-lix-2.91.3/share"unstable""nixos, nixos-25.05-25.05, unstable"/nix/var/nix/profiles/per-user/root/channels/nixosNotify maintainers
@NixOS/haskell
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.