snix/third_party/lisp/bordeaux-threads.nix
sterni d42784eb48 chore(3p/lisp): port to new new lisp-modules set
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
2025-02-27 14:51:41 +00:00

47 lines
1.2 KiB
Nix

# This library is meant to make writing portable multi-threaded apps
# in Common Lisp simple.
{ depot, pkgs, ... }:
let
src = with pkgs; srcOnly sbcl.pkgs.bordeaux-threads;
getSrc = f: "${src}/${f}";
in
depot.nix.buildLisp.library {
name = "bordeaux-threads";
deps = [
depot.third_party.lisp.alexandria
depot.third_party.lisp.global-vars
depot.third_party.lisp.trivial-features
depot.third_party.lisp.trivial-garbage
];
srcs = map getSrc [
"apiv1/pkgdcl.lisp"
"apiv1/bordeaux-threads.lisp"
] ++ [
{
sbcl = getSrc "apiv1/impl-sbcl.lisp";
ecl = getSrc "apiv1/impl-ecl.lisp";
ccl = getSrc "apiv1/impl-clozure.lisp";
}
] ++ map getSrc [
"apiv1/default-implementations.lisp"
"apiv2/pkgdcl.lisp"
"apiv2/bordeaux-threads.lisp"
"apiv2/timeout-interrupt.lisp"
] ++ [
{
sbcl = getSrc "apiv2/impl-sbcl.lisp";
ecl = getSrc "apiv2/impl-ecl.lisp";
ccl = getSrc "apiv2/impl-clozure.lisp";
}
(getSrc "apiv2/api-locks.lisp")
(getSrc "apiv2/api-threads.lisp")
(getSrc "apiv2/api-semaphores.lisp")
{
ccl = getSrc "apiv2/impl-condition-variables-semaphores.lisp";
}
(getSrc "apiv2/api-condition-variables.lisp")
];
}