about summary refs log tree commit diff
path: root/third_party/lisp/ironclad.nix (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-31 r/3723 style: format entire depot with nixpkgs-fmtVincent Ambo1-2/+3
This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
2021-12-15 r/3246 refactor(3p/lisp): Use sources from nixpkgs where possibleVincent Ambo1-48/+55
nixpkgs includes a lispPackages set which is generated from something. In the meantime, we pretty much never update our Lisp deps. This commit ties our sources to nixpkgs.lispPackages where the desired package is included in nixpkgs (which is actually most of them!) Change-Id: I520a006535980271b2fa4e0ed4e34029475dcbef Reviewed-on: https://cl.tvl.fyi/c/depot/+/4331 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-08-24 r/2772 feat(nix/buildLisp): add cclsterni1-0/+2
This adds support for Clozure's CL implementation to buildLisp. This is quite trivial in comparison to ECL since SBCL and CCL have very similar in how they work (so much so that CCL also suffers from b/136). Also the similarities in the code actually added here are striking, so I'll try to make an effort to reduce the code duplication in the future. To fix builds with CCL the following changes were made: * //3p/lisp/nibbles: The double inclusion of the types.lisp file was fixed. CCL doesn't like double definitions and refuses to compile otherwise. * //3p/lisp/physical-quantities: Update to a new bug fix release which contains a compilation fix for CCL. * //3p/lisp/routes: apply a patch fixing the build which was previously failing due to a double definition. * //3p/lisp/usocket: only depend on sb-bsd-sockets for SBCL and ECL, the latter of which seems to have a SBCL compatible implementation of the package. * Conditionally include a few CCL-specific source files and add `badImplementation` entries for the remaining failures which are //fun/gemma (to be expected) and //web/panettone which fails with an incredibly vague message. Change-Id: I666efdc39a0f16ee1bb6e23225784c709b04e740 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3350 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-24 r/2771 feat(nix/buildLisp): add eclsterni1-15/+22
Adds ECL as a second supported implementation, specifically a statically linked ECL. This is interesting because we can create statically linked binaries, but has a few drawbacks which doesn't make it generally useful: * Loading things is very slow: The statically linked ECL only has byte compilation available, so when we do load things or use the REPL it is significantly worse than with e. g. SBCL. * We can't load shared objects via the FFI since ECL's dffi is not available when linked statically. This means that as it stands, we can't build a statically linked //web/panettone for example. Since ECL is quite slow anyways, I think these drawbacks are worth it since the biggest reason for using ECL would be to get a statically linked binary. If we change our minds, it shouldn't be too hard to provide ecl-static and ecl-dynamic as separate implementations. ECL is LGPL and some libraries it uses as part of its runtime are as well. I've outlined in the ecl-static overlay why this should be of no concern in the context of depot even though we are statically linking. Currently everything is building except projects that are using cffi to load shared libaries which have gotten an appropriate `badImplementations` entry. To get the rest building the following changes were made: * Anywhere a dependency on UIOP is expressed as `bundled "uiop"` we now use `bundled "asdf"` for all implementations except SBCL. From my testing, SBCL seems to be the only implementation to support using `(require 'uiop)` to only load the UIOP package. Where both a dependency on ASDF and UIOP exists, we just delete the UIOP one. `(require 'asdf)` always causes UIOP to be available. * Where appropriate only conditionally compile SBCL-specific code and if any build the corresponding files for ECL. * //lisp/klatre: Use the standard condition parse-error for all implementations except SBCL in try-parse-integer. * //3p/lisp/ironclad: disable SBCL assembly optimization hack for all other platforms as it may interfere with compilation. * //3p/lisp/trivial-mimes: prevent call to asdf function by substituting it out of the source since it always errors out in ECL and we hardcode the correct path elsewhere anyways. As it stands ECL still suffers from a very weird problem which happens when compiling postmodern and moptilities: https://gitlab.com/embeddable-common-lisp/ecl/-/issues/651 Change-Id: I0285924f92ac154126b4c42145073c3fb33702ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/3297 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: eta <tvl@eta.st>
2021-08-15 r/2739 fix(3p/lisp/ironclad): add missing dependency on sb-posixsterni1-0/+1
This was previously propagated from somewhere else, but is actually needed here. Change-Id: I921758320ff5567b451291c69c8532d43a5c898c Reviewed-on: https://cl.tvl.fyi/c/depot/+/3358 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2020-07-26 r/1483 feat(3p/lisp): Add ironcladGriffin Smith1-0/+145
Add ironclad, a common lisp library for cryptography. This is a huge library with a lot of moving parts - probably most notable here is that I've had to turn off compiling with `:ironclad-assembly`, as it was causing an infinite loop in the compiler due to https://github.com/sharplispers/ironclad/blob/master/src/opt/sbcl/cpu-features.lisp#L9-L10, a mutually self-recursive function that looks like: (defun aes-ni-support-p () (aes-ni-support-p)) Without knowing much about how sbcl handles native-compiled assembly, it seems like this definition should actually be skipped entirely, due to it being defined as a `defknown` in `fndb.lisp`: (defknown ironclad::aes-ni-support-p () (boolean) (any) :overwrite-fndb-silently t) But something about how we're compiling things was causing that not to happen, and the infinite recursion caused the compiler to hang. This should be fixed at some point, but given I only need this library as a transitive dependency down a level I'm not going to attempt to do so now. Change-Id: Id768717991404f959b003c7e2f28f1f4d532b94b Reviewed-on: https://cl.tvl.fyi/c/depot/+/1333 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com>