Build //3p/lisp from pkgs proper, i.e. nixpkgs' nixos-unstable channel
instead of nixos-23.11 (yikes).
Basically, multiple package sets are attached to the different lisp
implementations now instead of having a “generic” lispPackages
set (which defaults to sbcl). We can just use that instead even though
it looks a bit weird having `srcOnly sbcl.pkgs.foo` everywhere when the
packages is not necessarily related to SBCL.
We could in theory create a source only package set by abusing how the
infrastructure works internally, but it's probably somewhat brittle:
  callPackage (pkgs.path + "/pkgs/development/lisp-modules/imported.nix") {
     build-asdf-system = { src, ... }: src;
  }
Since we do a pretty hefty jump in package versions, many packages have
to be adapted to internal changes and restructuring:
- bordeaux-threads
- cffi
- cl-colors2 (which has been deprecated, but is still required by other
  packages)
- cl-smtp
- cl-plus-ssl
- cl-prevalence
- hunchentoot (compiling the asd file no longer seemed to work)
- ironclad (fixes for SBCL compiler warnings caused a CCL compiler
  warning)
- nibbles (revert the only commit to sbcl-opt/x86-vm.lisp that's new
  compared to canon since it broke compilation for unknown reasons)
The following new packages had to be added as existing packages added
new dependencies:
- frugal-uuid, frugal-uuid/non-frugal
- trivial-clock
Change-Id: I8b94894df0357907cf2b27cf1e34a7e804b68e02
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13134
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
		
	
			
		
			
				
	
	
		
			68 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| # Hunchentoot is a web framework for Common Lisp.
 | |
| { depot, pkgs, lib, ... }:
 | |
| 
 | |
| let
 | |
|   src = with pkgs; srcOnly sbcl.pkgs.hunchentoot;
 | |
| 
 | |
|   url-rewrite = depot.nix.buildLisp.library {
 | |
|     name = "url-rewrite";
 | |
| 
 | |
|     srcs = map (f: src + ("/url-rewrite/" + f)) [
 | |
|       "packages.lisp"
 | |
|       "specials.lisp"
 | |
|       "primitives.lisp"
 | |
|       "util.lisp"
 | |
|       "url-rewrite.lisp"
 | |
|     ];
 | |
|   };
 | |
| in
 | |
| depot.nix.buildLisp.library {
 | |
|   name = "hunchentoot";
 | |
| 
 | |
|   deps = with depot.third_party.lisp; [
 | |
|     alexandria
 | |
|     bordeaux-threads
 | |
|     chunga
 | |
|     cl-base64
 | |
|     cl-fad
 | |
|     rfc2388
 | |
|     cl-plus-ssl
 | |
|     cl-ppcre
 | |
|     flexi-streams
 | |
|     md5
 | |
|     trivial-backtrace
 | |
|     usocket
 | |
|     url-rewrite
 | |
|   ];
 | |
| 
 | |
|   srcs = map (f: src + ("/" + f)) [
 | |
|     "packages.lisp"
 | |
|     "compat.lisp"
 | |
|   ] ++ [
 | |
|     (pkgs.runCommand "specials.lisp" { } ''
 | |
|       substitute "${src}/specials.lisp" "$out" --replace-fail \
 | |
|         ${lib.escapeShellArg "#.(asdf:component-version (asdf:find-system :hunchentoot))"} \
 | |
|         '"${lib.removePrefix "v" src.version}"'
 | |
|     '')
 | |
|   ] ++ map (f: src + ("/" + f)) [
 | |
|     "conditions.lisp"
 | |
|     "mime-types.lisp"
 | |
|     "util.lisp"
 | |
|     "log.lisp"
 | |
|     "cookie.lisp"
 | |
|     "reply.lisp"
 | |
|     "request.lisp"
 | |
|     "session.lisp"
 | |
|     "misc.lisp"
 | |
|     "headers.lisp"
 | |
|     "set-timeouts.lisp"
 | |
|     "taskmaster.lisp"
 | |
|     "ssl.lisp"
 | |
|     "acceptor.lisp"
 | |
|     "easy-handlers.lisp"
 | |
|   ];
 | |
| 
 | |
|   brokenOn = [
 | |
|     "ecl" # dynamic cffi
 | |
|   ];
 | |
| }
 |