It's extremely hard to debug such errors. It would help to print out the value of the list to see what's there that shouldn't be.
Oh, seems I was here already with a "thumbs up". Just hit this again. Isn't this really easy to fix? CC @edolstra.
Any updates?
Hit this issue again.
Newb here, I'm gettin this error when running nix-shell -E '(import ./default.nix).nodejs."13.6.0"', and the files are:
./default.nix
{pkgs ? import <nixpkgs> {}}: {
nodejs = (import ./nodejs { inherit pkgs; })."13.6.0";
}
./nodejs/default.nix
{pkgs ? import <nixpkgs> {}}: {
"13.6.0" = pkgs.callPackage ./nodejs.nix {
inherit pkgs;
version = "13.6.0";
sha256 = "00f01315a867da16d1638f7a02966c608e344ac6c5b7d04d1fdae3138fa9d798";
};
}
./nodejs/nodejs.nix
{ pkgs ? import <nixpkgs> {}, version, sha256 }:
let
inherit (pkgs) stdenv autoPatchelfHook platforms fetchurl;
inherit (stdenv) mkDerivation lib;
in mkDerivation {
inherit version;
name = "nodejs-${version}";
src = fetchurl {
url = "https://nodejs.org/dist/v${version}/node-v${version}-linux-x64.tar.xz";
inherit sha256;
};
nativeBuildInputs = with pkgs; [autoPatchelfHook];
buildInputs = with pkgs; [glib];
installPhase = ''
mkdir -p $out
cp -R ./ $out/
'';
meta = {
description = "Event-driven I/O framework for the V8 JavaScript engine";
homepage = https://nodejs.org;
license = lib.licenses.mit;
platforms = lib.platforms.linux;
};
}
This issue is generally not the best place to get help with specific nixpkgs related errors. This issue tracker is for the evaluator for the Nix language.
You could try on the discourse at https://discourse.nixos.org/ , or the #nixos channel on freenode at https://webchat.freenode.net/ , or perhaps on the nixpkgs issue tracker https://github.com/NixOS/nixpkgs/issues . Preferably one of the first two IMHO.
That said, next time you have a problem it would help if you post a traceback, which you can usually get by passing --show-trace to the nix tools (but not always, we still have problems with inconsistent interfaces). Which is fitting for this issue, because we have no idea where to even look for the problem in your code. :P
cc @bburdette this one should be high priority for phase 3 of https://opencollective.com/nix-errors-enhancement
Most helpful comment
Oh, seems I was here already with a "thumbs up". Just hit this again. Isn't this really easy to fix? CC @edolstra.