Uthar / nix-cl

Utilities for packaging ASDF systems using Nix
BSD 2-Clause "Simplified" License
15 stars 6 forks source link

README example throws error #2

Closed nagy closed 2 years ago

nagy commented 2 years ago

When attempting to run the example from the readme, I get the following error:

$ HOME=$PWD nix-shell -p 'with import ./. {}; sbclWithPackages (ps: [ps.hunchentoot ps.sqlite])' --run "sbcl --noinform --eval '(require :asdf)' --eval '(asdf:load-system :hunchentoot)'"

debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {1004B78323}>:
  Can't create directory /nix/store/wywjn6x9hcn5qd5z8nmiw49r0agniqak-babel-20200925-git/build

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry directory creation.
  1: [RETRY                        ] Retry
                                     compiling #<CL-SOURCE-FILE "asdf" "build" "asdf">.
  2: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "asdf" "build" "asdf">
                                     as having been successful.
  3:                                 Retry ASDF operation.
  4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  5: [CONTINUE                     ] Ignore runtime option --eval "(asdf:load-system :hunchentoot)".
  6: [ABORT                        ] Skip rest of --eval and --load options.
  7:                                 Skip to toplevel READ/EVAL/PRINT loop.
  8: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the process).

(SB-KERNEL::%FILE-ERROR #P"/nix/store/wywjn6x9hcn5qd5z8nmiw49r0agniqak-babel-20200925-git/build/asdf.fasl" "Can't create directory ~A~:[~;,~%a file with ~
                          the same name already exists.~]" "/nix/store/wywjn6x9hcn5qd5z8nmiw49r0agniqak-babel-20200925-git/build" NIL)
0]
;
; compilation unit aborted
;   caught 1 fatal ERROR condition
* 

Does this maybe have something todo with asdf's output path translations?

Uthar commented 2 years ago

Got this as well

Found out that this is caused by a change to makeWrapper from https://github.com/NixOS/nixpkgs/commit/c67f885fe4cf70856b9f0052c1ce48f1abfcfe95 which, yes, messes up the path translations.

I have pinned nixpkgs for now (602f6c80d4848a4550a1a24b11b3eaa0fd546785) to avoid such issues in the near future. I will eventually write a flake so that the nixpkgs version can be easily substituted, but this will at least make it work in the meantime.

nagy commented 2 years ago

Thanks, it works now. You can close this issue, or keep it open for the makeWrapper adaptation. As you wish.

Uthar commented 2 years ago

Thanks for pointing out the problem as well