I get this error after trying to upgrade, when I switch to the new version of Nix. I didn’t know how to switch and didn’t realize I don’t get upgrades for a while. Now I finally tried and get this. I can go back to version 23 and install things, but with version 24 I can not run the rebuild program anymore.
sudo nixos-rebuild switch --upgrade
[sudo] password for user:
unpacking channels...
building Nix...
building the system configuration...
error:
… while calling the 'head' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:1575:11:
1574| || pred here (elemAt values 1) (head values) then
1575| head values
| ^
1576| else
… while evaluating the attribute 'value'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:809:9:
808| in warnDeprecation opt //
809| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
810| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error: Lisp packages have been redesigned. See 'lisp-modules' in the nixpkgs manual.
This might have happened because I once switched to version 24 in the config file, since I misunderstood some instructions, then I switched back later. I wonder how the system can recover, since I’m on a very old version of Firefox now.
Uhm, could you post what you have about Common Lisp in your configuration?
I have clisp and picolisp installed:
GNU CLISP 2.49.92 (2018-02-18) (built on localhost [127.0.0.1])
Software: GNU C 12.3.0
gcc -g -O2 -no-integrated-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv -pthread -fno-strict-aliasing -DNO_ASM -DENABLE_UNICODE -DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -DDYNAMIC_MODULES libgnu.a -lreadline -lncurses -lffcall -lsigsegv
SAFETY=0 HEAPCODES ONE_FREE_BIT_HEAPCODES WIDE_HARD GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.14
libreadline 8.2
libffcall 2.4
Features:
(READLINE REGEXP WILDCARD SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER
LOGICAL-PATHNAMES MT SOCKETS GENERIC-STREAMS SCREEN FFI GETTEXT UNICODE BASE-CHAR=CHARACTER WORD-SIZE=64 PC386
UNIX)
C Modules: (clisp i18n syscalls regexp readline)
Installation directory: /nix/store/i362rjk6q4qpg9cji2c0mpd9i9jd4y94-clisp-2.50pre20230112/lib/clisp-2.49.92/
User language: ENGLISH
Machine: X86_64 (X86_64) nixosLaptop [127.0.0.2]
I don’t know how to look up the version of Picolisp right now.
Edit: I also have Emacs installed. And I just realized you’re going for one of these lisps being the problem, but I thought it was the lisp NixOS uses. I think it uses Guile which is GNU Guile 3.0.9.
Nix per se and a minimal installation of NixOS does not use Guile, it’s not Guix.
The message is about Common Lisp so about CLISP. What do you have in your configuration to install extra packages for CLISP?
1 Like
Thanks. THIS. This is where my brain got hung up. I jumped from “error with Lisp” to the idea that this must be related to the OS userland itself, because I had this idea in the back of my head that it is written in Lisp. I know how Lisp looks like, so I know the nix-config isn’t Lisp, but I somehow thought it was used under the hood. Because I first wanted to use Guix.
Anyways. It was just some packages I needed to deactivate, now it works. It was most likely one of those:
#emacsPackages.sqlite
#lispPackages.sqlite
I didn’t reactivate them yet, but I will try to know which one is broken.
#haskellPackages.epub-tools is also broken.
I expect that emacsPackages.sqlite
is fine, and the new way to get lispPackages.sqlite
is via clisp.pkgs.sqlite
or even clisp.withPackages (p: [p.sqlite])
instead of clisp
.
Obviously, if you only added both packages for a one-off experiment long ago, it’s fine to drop them.