Open haruki7049 opened 1 month ago
@hraban I'm sorry to mention this, but could you help me out a little? In case you are wondering, I have limited knowledge of CommonLisp and English, so it would be helpful if you could take that into account when you talk to me.
I couldn't reproduce this bug. However sometimes a bug can be hidden on Mac while it shows up on NixOS. This is because Mac has more global libraries available, especially for stuff like crypto.
However I did run into a different problem which I solved like this:
diff --git i/with-nix-flakes/flake.nix w/with-nix-flakes/flake.nix
index 7c40da9..f8b3e08 100644
--- i/with-nix-flakes/flake.nix
+++ w/with-nix-flakes/flake.nix
@@ -19,6 +19,7 @@
src = pkgs.lib.cleanSource ./.;
lispDependencies = with pkgs.lispPackagesLite; [
clack
+ clack-handler-hunchentoot
hunchentoot
];
meta = with lib; {
diff --git i/with-nix-flakes/lisp-webserver.asd w/with-nix-flakes/lisp-webserver.asd
index 2f1b2d9..1627962 100644
--- i/with-nix-flakes/lisp-webserver.asd
+++ w/with-nix-flakes/lisp-webserver.asd
@@ -7,4 +7,4 @@
:build-pathname "bin/lisp-webserver"
:entry-point "lisp-webserver:main"
:components ((:file "main"))
- :depends-on ("clack" "hunchentoot"))
+ :depends-on ("clack" "hunchentoot" "clack-handler-hunchentoot"))
(source: https://stackoverflow.com/questions/54203075/hunchentoot-is-unknown-handler )
Now I can run your app:
$ nix run
Hunchentoot server is started.
Listening on 127.0.0.1:8080.
$
It immediately exits because clack doesn't keep the app alive, so if nothing else keeps the app alive it quits. But that's not a problem with Nix, that's just how Clack works.
I can try on a NixOS virtual machine later but for now I don't see anything immediately wrong with this app.
How to reproduce
Commit: f244842eab995a794ac35e5fe27e399cb4f2fa21
Error is:
nix-shell -p nix-info --run "nix-info -m"
's result