Build failed with a temp file name

I tried to build a new nyxt on nixos by modifying the nixpkgs definition. The following messages I got:

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/mrh4yw54wm96yl0d2dwk5z54zn332y38-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
This is SBCL 2.3.2.nixos, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* T
* WARNING: System definition file #P"/nix/store/l3h3lc1li1pl6zmv8n6fkw3aspkvclrc-calispel-20170830-git/calispel.asd" contains definition for system "calispel-test". Please only define "calispel" and secondary systems with a name starting with "calispel/" (e.g. "calispel/test") in that file.
WARNING: System definition file #P"/nix/store/chkzkz2zxszhiqk2pc8n7l3ags8a84kc-s-xml-20150608-git/s-xml.asd" contains definition for system "s-xml.test". Please only define "s-xml" and secondary systems with a name starting with "s-xml/" (e.g. "s-xml/test") in that file.
WARNING: System definition file #P"/nix/store/chkzkz2zxszhiqk2pc8n7l3ags8a84kc-s-xml-20150608-git/s-xml.asd" contains definition for system "s-xml.examples". Please only define "s-xml" and secondary systems with a name starting with "s-xml/" (e.g. "s-xml/test") in that file.
WARNING: System definition file #P"/nix/store/sq1mspakwqwmw2g84grbna2c0a2s4wjc-montezuma-20180228-git/montezuma.asd" contains definition for system "montezuma-tests". Please only define "montezuma" and secondary systems with a name starting with "montezuma/" (e.g. "montezuma/test") in that file.
WARNING: UIOP/VERSION:PARSE-VERSION: "1.1-dev" doesn't follow asdf version numbering convention
WARNING: Invalid :version specifier "1.1-dev" for component "py-configparser" from file #P"/nix/store/mv6frz3pn0k7z6mw674ml2i7j2zibq1x-py-configparser-20170830-svn/py-configparser.asd", using NIL instead
WARNING: Invalid :version specifier "1.1-dev" for component "py-configparser" from file #P"/nix/store/mv6frz3pn0k7z6mw674ml2i7j2zibq1x-py-configparser-20170830-svn/py-configparser.asd", using NIL instead
;;; Computing Hangul syllable namesWARNING: redefining S-SERIALIZATION::SERIALIZE-SEXP-INTERNAL in DEFGENERIC
WARNING: redefining CL-PREVALENCE:GET-ID in DEFGENERIC
WARNING: redefining CL-PREVALENCE:GET-NAME in DEFGENERIC
WARNING: redefining (COMMON-LISP:SETF CL-PREVALENCE:GET-NAME) in DEFGENERIC
WARNING: redefining CL-PREVALENCE:GET-SIZE in DEFGENERIC
WARNING: redefining CL-PREVALENCE:GET-MIME-TYPE in DEFGENERIC
WARNING: redefining (COMMON-LISP:SETF CL-PREVALENCE:GET-MIME-TYPE) in DEFGENERIC
WARNING: redefining CL-PREVALENCE:GET-KEYWORDS in DEFGENERIC
WARNING: redefining (COMMON-LISP:SETF CL-PREVALENCE:GET-KEYWORDS) in DEFGENERIC
WARNING: No definition for LFP-SPAWN-SETUID
WARNING: No definition for LFP-SPAWN-SETGID
WARNING:
   redefining CONSUME-ITEM (#<BUILT-IN-CLASS COMMON-LISP:SYMBOL>
                            #<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>) in DEFMETHOD
WARNING: redefining LOG4CL-IMPL:APPENDER-ADDED in DEFGENERIC
WARNING: redefining LOG4CL-IMPL:APPENDER-REMOVED in DEFGENERIC
WARNING: redefining LOG4CL-IMPL::PROPERTY-ALIST in DEFGENERIC

debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {1001118113}>:
  Error opening #P"/nix/store/3qz06zjc898y884svd218ypdq29zwbp2-njson-20230214-git/backend/cl-json-tmpAAURSO1.fasl":

    Permission denied

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE                     ] Retry opening.
  1: [USE-VALUE                    ] Try opening a different file.
  2: [RETRY                        ] Retry
                                     compiling #<CL-SOURCE-FILE "njson/cl-json" "backend/cl-json">.
  3: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "njson/cl-json" "backend/cl-json">
                                     as having been successful.
  4:                                 Retry ASDF operation.
  5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  6: [ABORT                        ] Exit debugger, returning to top level.

(SB-IMPL::FILE-PERROR #P"/nix/store/3qz06zjc898y884svd218ypdq29zwbp2-njson-20230214-git/backend/cl-json-tmpAAURSO1.fasl" 13 "Error opening ~S" #P"/nix/store/3qz06zjc898y884svd218ypdq29zwbp2-njson-20230214-git/backend/cl-json-tmpAAURSO1.fasl")
0] 
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
* @nix { "action": "setPhase", "phase": "glibPreInstallPhase" }
glibPreInstallPhase
@nix { "action": "setPhase", "phase": "installPhase" }
installing
mkdir: created directory '/nix/store/na1x8han1zg56wjrsc7qysa0fjbm9bj4-nyxt-3-pre-release-6'
removed '/nix/store/na1x8han1zg56wjrsc7qysa0fjbm9bj4-nyxt-3-pre-release-6/libraries/nasdf/nasdf.asd'
rm: cannot remove '/nix/store/na1x8han1zg56wjrsc7qysa0fjbm9bj4-nyxt-3-pre-release-6/nyxt': No such file or directory

It tried to build cl-json-tmpAAURSO1.fasl, which contains a tmp suffix name. Why is it happened? and cl-json.lisp is existed instead of a fasl file.

I think this is a temp file, but the path sbcl read is a read-only path. Is there a way to change the build and loading path?

Are you using Quicklisp or just NixOS for everything? If you are using NixOS for everything, I can’t really help you, I’m sorry! Hopefully someone else can chime in!

@jmercouris, AFAIK, Nix (unlike Guix) does not reliably manage CL dependencies. I.e., off-loading Quicklisp is the only way to do it in Nix!

@vonfry I’m afraid I can’t help much either, and I believe this question needs to be addressed to the Nix maintainers. The situation here (as far as I can understand) is that you’re downloading the sources of cl-json to the store and then you can’t possibly build it, since the .fasl can’t be written to a read-only directory. What Guix does is to distinguish between the sources and what results from building them. Notice that what results from building depends on the CL implementation used. In other words, you need a package that simply keeps the sources, and compiling those populates a directory such as $HOME/.cache/common-lisp/sbcl/. Then you need a package that stores the .fasl (in the case of SBCL) that results from building it. In short, for library foo, you’d have cl-foo (sources), sbcl-foo, ccl-foo, ecl-foo, …

Nonetheless, I think we’re digressing. This was done in the past and it was working, so it must be possible. The goal is to package the latest Nyxt release for Nix. @jmercouris, did you try to do it? Theoretically, it should be straightforward.

Thanks for your reply.
The issue has been fixed by change input from current overlay instead of super. Because, nixpkgs uses original source in the lisp module and each overlap of complier, such as sbcl, overrides the build script to generate these files.
However, there are some new issues to build nyxt 3.

I’ve left a comment there, but I’m not sure if it’s very helpful.