about summary refs log tree commit diff
path: root/nix/buildLisp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-31 r/6224 chore: remove comments formerly meant for alignmentsterni1-1/+0
/**/ is a nice way to align if statements which doesn't work with nixpkgs-fmt, since it'll reflow the comment to the line preceding the if. Consequently, we can delete these comments now. Change-Id: Ifa5327f846a903e07607b21f8eedbc32fc36f758 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8689 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-28 r/4980 chore(3p/sources): Bump channels & overlayssterni1-5/+5
Upstream nixpkgs removed a lot of aliases this time, so we needed to do the following transformations. It's a real shame that aliases only really become discoverable easily when they are removed. * runCommandNoCC -> runCommand * gmailieer -> lieer We also need to work around the fact that home-manager hasn't catched on to this rename. * mysql -> mariadb * pkgconfig -> pkg-config This also affects our Nix fork which needs to be bumped. * prometheus_client -> prometheus-client * rxvt_unicode -> rxvt-unicode-unwrapped * nix-review -> nixpkgs-review * oauth2_proxy -> oauth2-proxy Additionally, some Go-related builders decided to drop support for passing the sha256 hash in directly, so we need to use the generic hash arguments. Change-Id: I84aaa225ef18962937f8616a9ff064822f0d5dc3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6792 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: wpcarro <wpcarro@gmail.com>
2022-09-20 r/4934 refactor(nix/buildLisp/tests/argv0): use derivation for testssterni1-35/+57
There is no need to use an extraStep, actually, and using derivations reduces noise on CI. Change-Id: I897c3c3f7e0acee8f051fcc01450ff57176726f8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6573 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-08-30 r/4546 feat(nix/buildLisp): re-enable CCLsterni1-2/+1
The problem went away once again, let's see how long it'll last this time. As it turns out, CCL has a Unicode Standard conforming string implementation that doesn't allow the use of (lone) surrogate code points, requiring us to disable a test in cl-json which tested the behavior of en- and decoding of such a (technically illegal) string. Change-Id: I8bfa482934bbf94f86cecdde02d5c3d4e77950a5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6204 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
2022-06-01 r/4200 fix(nix/buildLisp): resolve eval problem in ccl codesterni1-2/+2
The isPowerPC predicate has been [removed], since it was misleadingly named (it just matches PowerPC, 32bit, little endian). This means the 64bit code path could now actually work. Not sure about endianess, the CCL docs don't really say much regarding that topic. [removed]: https://github.com/NixOS/nixpkgs/pull/168113 Change-Id: Icf4a8c6b1df95fa597ed87508f57aaa73e6185ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/5796 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-27 r/4149 chore(3p/sources): Bump channels & overlayssterni1-1/+2
* //nix/buildLisp: disable CCL once again due to The Mysterious Runtime Bug™. * //users/tazjin/nixos: uninstall dmd which is broken in nixpkgs atm. Change-Id: I8dd2220af48a7e087584b6f50529fb8477e6a2fb Reviewed-on: https://cl.tvl.fyi/c/depot/+/5699 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-04 r/4003 chore(3p/sources): Bump channels & overlayssterni1-2/+1
* //nix/buildLisp: ccl dumped images have fixed themselves… again * //3p/git: rebase patch on 2.36.0 * //3p/overlays/haskell: remove upstreamed workarounds * Disable everything depending on cgit temporarily, since it doesn't compile with git 2.36 yet. Change-Id: I9dc11c0846641341adbdcc7162cbf149a15fe0cb Reviewed-on: https://cl.tvl.fyi/c/depot/+/5519 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-04-11 r/3942 chore(3p/sources): Bump channels & overlayssterni1-1/+2
Use nixos-unstable-small which fixes CVE-2018-25032 (out of bounds write while compressing). * //users/grfn/xanthous: - Supporting random-fu 0.3 requires considerable changes and patching random-extras (https://github.com/aristidb/random-extras/pull/5). For now we downgrade random-fu and its dependency rvar to 0.2.*, forcing us to build xanthous with GHC 8.10.7, due to random-fu 0.2.* not supporting that version. Nix expressions for the downgraded packages are checked in to avoid the potential need to compile Haskell at pipeline eval time. - generic-arbitrary exposes a GenericArbitrary newtype now. This means we no longer have to implement it in xanthous downstream and patch generic-arbitrary to expose the GArbitrary type class. - Minor adjustments for lens 5.0: Xanthous.Game.Memo: clear needs to use ASetter' instead of Lens' Xanthous.Data.EntityMap: TraversableWithIndex no longer has an itraversed function. - Xanthous.Orphans: adjust for aeson's KeyMap, use KM.size explicitly instead of relying on MonoTraversable's length * //nix/buildLisp: the CCL issue has resurfaced, disabling the implementation once again. * //3p/arion: remove, as depot uses the nixpkgs package of it anyways. * //users/wpcarro: accomodate GHC 9.0.1's stricter parsing of operators. * //users/tazjin: disable rustfmt as it stopped respecting settings * //3p/overlays: upgrade home-manager until fix for serivce generation has landed upstream * //users/grfn/system: remove rr override, as the pinned commit is part of the 5.5.0 release shipped by nixpkgs. Change-Id: If229e7317ba48498f85170b57ee9053f6997ff8a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5428 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: wpcarro <wpcarro@gmail.com>
2022-02-13 r/3812 chore(3p/sources): Bump channels & overlayssterni1-2/+1
* //nix/buildLisp: re-enable CCL, as the crash has been fixed upstream, although it is unclear what exactly caused / fixed it. * //ops/whitby: the kitty build broke upstream, so we can't install the terminfo on whitby for a bit. Change-Id: I5710acbe837fbc936e334b2e81f9cf00ed6ae280 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5274 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-02-07 r/3785 chore(nix/buildLisp): meta.targets -> meta.ci.targetsVincent Ambo2-2/+4
Change-Id: Ic8effcc94f3fcfa283436be3e5c0477ef89e9e94 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5247 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: tazjin <tazjin@tvl.su>
2022-02-04 r/3767 chore(3p): Bump NixOS channels and emacs overlay to 2022-02-03sterni1-1/+2
* //nix/buildLisp: This channel bump brought a bizarre regression in ccl, causing binaries to crash on thread clean up. This was likely caused by a glibc update in nixpkgs. We'll disable emitting CI targets for ccl until we can find out and fix what's going on. Change-Id: I37629f384fa99ec4ef96ce7127fa7569adecb687 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5207 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: sterni <sternenseemann@systemli.org>
2022-02-02 r/3745 fix(nix/buildLisp): make uiop:argv0 work also for ccl and sbclsterni2-1/+46
Detection is broken there, too, as UIOP relies on setting the variable before dumping the image in its portability wrapper dump-image which we don't use at all. Change-Id: If7bea5a8522a2e64707b1ee88d62d420bd00a952 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5112 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-01-31 r/3723 style: format entire depot with nixpkgs-fmtVincent Ambo2-131/+165
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>
2022-01-28 r/3692 feat(3p/overlays/ecl-static): 21.2.1 -> 1c98924sterni1-4/+3
Seems like some issues to do with bytecode compilation have been fixed at HEAD. closer-mop compiles again and an ironclad failure with the next quicklisp/channel bump is avoided. In this change pathname handling in ECL also changed somehow, causing it to make the :directory part absolute by prefixing it with a slash which made ld.bfd unhappy while linking an output path that began with a double slash. This problem can be avoided by constructing the path as ANSI Common Lisp intended. The truename on the out path is important to make it recognize that it is indeed a directory. Change-Id: I5e744022b92502f99ac0b33411a6be443707e200 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5076 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-01-19 r/3634 fix(nix/buildLisp): use filtered deps for native deps in testSuitesterni1-1/+1
allDeps filters the lisp deps according to the given implementation, processing any implementation conditional attribute sets. These are not understood by allNative, so we need to pass it the already filtered input or evaluation would fail. Change-Id: I9eb2d0c3b2bf70d759d03490cf31fc585283ce7f Reviewed-on: https://cl.tvl.fyi/c/depot/+/5001 Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-12-20 r/3328 fix(nix/buildLisp): don't emit a target for impl used at top levelsterni1-1/+1
These targets would be the same derivation, but named differently which is noisy and causes a few, mostly subtle issues: * Buildkite struggles with large pipelines a bit, we can save quite a few steps by removing these. * Having two jobs for the same derivation sometimes causes the annoying situation that an agent would do nothing except waiting for a lock. * Non-nix CI we add in the future may not be able to recognize that these targets are the same and do extra work unnecessarily. Change-Id: I1103e719ade1d3859d222b713969ac34a8765cba Reviewed-on: https://cl.tvl.fyi/c/depot/+/4515 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-12 r/2852 fix(nix/buildLisp): preserve argv[0] in buildLisp.programsterni1-7/+6
I *thought* I was being clever with the (cdr (member …)) call, but somehow completely forgot that *posix-argv* and *command-line-argument-list* are equivalent to argv, so they also contain the program name as the first element. Dropping that made argument parsing completely break down, so let's revert back to the older solution which works quite well. Change-Id: If7d3321cda0ca512bc8c23b6541ce390b81a3e24 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3538 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-26 r/2779 docs(nix/buildLisp): document NIX_BUILDLISP_LISP_ARGSsterni1-0/+24
Change-Id: I54294da08ee08bcf6cba6c792a2a2235b988a778 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3422 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-26 r/2778 docs(nix/buildLisp): move example further upsterni1-29/+29
Make "Example" the second section again since it got a bit buried under a lot of detailed documentation you won't necessarily need right away. Change-Id: I481354d1761c590e5872dfce8c3cf9934e278673 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3421 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-08-26 r/2777 fix(nix/buildLisp): prevent image loader from parsing argumentssterni1-3/+22
CCL and SBCL create executables by dumping their image. As a consequence, some part of the respective compiler is embedded in the resulting executable which is executed and loads the image. For CCL and SBCL this piece of software seems to unconditionally parse arguments which can't be prevented since it happens before any lisp is loaded. Luckily in both cases the parsing stops at `--`, so we can just pass this via the wrapper — we just need to work around the problem that this will of course be left in argv and confuse any later code. This can be rectified by deleting everything prior to the first `--` in the global argument list on startup in both cases. In cases we do want to pass arguments to the image loader, we can use the special NIX_BUILDLISP_LISP_ARGS environment variable which is understood by the wrapper. Note: This fix doesn't interfere with ECL since it is not using the wrapper script at the moment. Fixes b/136. Change-Id: I3f95aa61e945e51428021ca18232ff15c923f870 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3357 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: grfn <grfn@gws.fyi>
2021-08-24 r/2774 docs(nix/buildLisp): document recent changes to buildLispsterni1-10/+119
Doing this in a separate CL to avoid having to track the intermediate changes no one will ever see in documentation as well which would be unnecessary effort. * Multi-implementation support introduced in cl/3292 and refined in cl/3368 in terms of the user interface. * Implementation specific srcs and deps introduced in cl/3321 * Implementation passthru attrs and rename from .sbcl -> .repl was done in cl/3359 * ECL added in cl/3297, CCL in cl/3350 Change-Id: Ia13f2aea4e7e091c00991fcbfc601de364413979 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3380 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-24 r/2773 feat(nix/buildLisp): pass implementation description instead of namesterni1-30/+32
Instead of using a string to refer to an internal set defined in buildLisp, we just expose the relevant sets (as nix.buildLisp.sbcl, nix.buildLisp.ecl, …) and receive them as the `implementation` argument directly. This has several advantages: * It becomes easier to extend buildLisp, even for downstream users: Since you can just pass your own set, there's nothing stopping you from adding support for another implementation in a downstream derivation without having to edit the buildLisp file in any way which is great if you're using e. g. builtins.fetchGit to import it. * Users can mess with the implementation set by changing out some parts of it for customization purposes. Note that currently the sets use a lot of self-references which aren't even bound by a fix-point, so to make this work smoothly, we'd need to add some overriding mechanism. * The buildLisp code becomes quite a bit clearer. Since we're now always dealing with the implementation set, the confusing distinction between `impl`, `impl.name` and `implementation` no longer exists. `impl` is now exclusively an abbreviation of `implementation` (we could make this more consistent in the future even). Change-Id: I36d68069dd1315610b2f7159941507b465469b7c Reviewed-on: https://cl.tvl.fyi/c/depot/+/3368 Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-08-24 r/2772 feat(nix/buildLisp): add cclsterni1-1/+103
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-4/+157
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-24 r/2770 feat(nix/buildLisp): expose drvs built w/ the other implementationssterni1-10/+48
For every implementation we support an extra passthru attribute with the name of the implementation is created which points to a version of the derivation built with that implementation. E. g. if we support CCL, ECL and SBCL, third_party.lisp.alexandria would have: * third_party.lisp.alexandria.sbcl * third_party.lisp.alexandria.ecl * third_party.lisp.alexandria.ccl To make this possible, the REPL derivation which was called `sbcl` originally has been renamed to `repl`. Since some things won't build with all implementations, we introduce a brokenOn argument which influences the meta.targets list that is created, but won't prevent the passthru attrs from being created to ease debugging failures. Change-Id: Icd6af345143593fac30ded10deabf31172e5d48a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3359 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-24 r/2769 feat(nix/buildLisp): implementation specific deps and srcssterni1-13/+67
Both the deps and srcs arguments may now have special “filter sets” in the lists they receive as arguments. When building, buildLisp checks if such sets either have a attribute named like the current implementation or a "default" attribute. If yes, the set is replaced by the respective attribute's value. If no, the set is removed from the list without replacement. This can be used to add elements for (a) specific implementation(s): { sbcl = buildLisp.bundled "sb-posix"; } { sbcl = ./sbcl/optional-sbcl.lisp; } or to switch between files for different implementations: # If a implementation case is missing and no default set present, # no file will be added. Compilation will likely fail as a result. { ecl = ./tf-ecl.lisp; ccl = ./tf-ccl.lisp; sbcl = ./tf-sbcl.lisp; } or to account for special behavior for a certain implementation: { ccl = ./ccl-quirk-impl.lisp default = ./ansi-impl.lisp; } Change-Id: I082c3701d1f5063b92100bf336a83425471c269d Reviewed-on: https://cl.tvl.fyi/c/depot/+/3321 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-24 r/2768 feat(nix/buildLisp): allow implementation-specifc bundled functionssterni1-6/+32
By implementing a bundled function for an implementation, we can use a custom one for a specific implementation. This is useful for implementations like ECL where a require will be compiled as an instruction rather than importing all new symbols into a dump, so using the underlying static or shared object directly would be beneficial. overrideLisp for bundled libraries now only allows overriding the name and implementation arguments. Change-Id: I9036b29157e8daa4d86ff87d603b044373711dbf Reviewed-on: https://cl.tvl.fyi/c/depot/+/3301 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-24 r/2767 refactor(nix/buildLisp): prepare multi implementation supportsterni1-105/+188
Concept is roughly: * receive extra argument `implementation` that refers to the name of an implementation or rather an attribute in an internal attribute set telling buildLisp how to do certain build steps. * We assume an implementation can execute lisp files as scripts and that we can implement the following main tasks in lisp: - Building a library (`genCompileLisp`) - Building an executable (`genDumpLisp`) - Loading a library dynamically (`genLoadLisp`) Based on that we can implement: - Running a test suite (`genTestLisp`) - A REPL preloaded with a libraries and their dependencies (`lispWith`) Additional attributes for implementing these parts genericly are added as needed (`faslExt` and `runScript`). * `genCompileLisp` no longer prints a shell script which concatenates the individual FASLs. Instead it does the step previously done by the shell script itself. In essence `genCompileLisp` now writes a lisp script which compiles and installs the library to build. This will allow us extra freedom for different implementations, e. g. for ECL we'll want to build a object file archive additionally to fasl files in order to be able to link proper executables. * `genLoadLisp` and `genTestLisp` are almost generic (the former just sometimes would need to use different file extensions), but we integrate them into the implementation “API” to facilitate minor tweaks we need to do like the `fasc` extension for ECL's native FASL files. Change-Id: I1b8ccc0063159638ec7af534e9a6b5384e750193 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3292 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-12 r/2722 docs(nix/buildLisp): mention drawback of non-parallel compilationsterni1-0/+4
To be fair this hardly matters since SBCL is quite fast, but compiling ironclad with ECL is quite the experience… Change-Id: Ib89cc50e5d557acec51fdb085bcbdfc99736221e Reviewed-on: https://cl.tvl.fyi/c/depot/+/3342 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-10 r/2716 fix(nix/buildLisp): remove misplaced `makeOverridable`ssterni1-2/+1
`makeOverriddable` doesn't work for bundled sbclWith as is because it uses the `//` operator internally which doesn't work with the types `bundled` and `sbclWith` accept as arguments (string and list respectively). What's more, `bundled` already uses `makeOverridable` and allows to override the internal call to `library` via `overrideLisp`. For `sbclWith` no such mechanism exists, but this seems to be no concern for now: Using `overrideLisp` for this hasn't worked so far (and failed with a _hideous_ evaluation error), so there doesn't seem to be any real demand for this feature. Maybe a feature for another CL. Change-Id: I0b2f34c00a2143cd66dd43a6b1b2880af997ee50 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3296 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-01 r/2701 refactor(nix/buildLisp): use passthru for extra attributessterni1-15/+17
Using passthru and appending the attributes via `//` have the same effect with a subtle difference: In the latter case re-evaluating the derivation when using the underlying `mkDerivation`'s `overrideAttrs` will delete all appended attributes. Using passthru at least preserves the attributes although the self reference to the derivation in `passthru.sbcl` will become outdated (unless updated manually). Change-Id: I8b85009f386b9375b86a23fd50c4ec8c6a9dea7f Reviewed-on: https://cl.tvl.fyi/c/depot/+/3257 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: grfn <grfn@gws.fyi>
2020-11-08 r/1873 fix(buildLisp): Override LANG in sbclWith for misconfigured machinesVincent Ambo1-1/+2
Machines on which LANG is misconfigured have trouble with SBCL loading files that contain characters in certain encodings. This overrides whichever local LANG (if any) is set. Change-Id: Ic4341a01c4393e7f697de6cecc58dea4f2d85987 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2076 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-08-23 r/1706 feat(nix/buildLisp): Expose an sbcl attributeGriffin Smith1-4/+6
Expose an `sbcl` attribute on packages and programs, to allow for easier development either with SLY or on a REPL. Change-Id: Ide4d087a5223561e1fe192ef32dc593c54b5a20e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1834 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-07-27 r/1492 feat(nix/buildLisp): Add abstraction for test suitesGriffin Smith2-50/+142
Add support for explicitly specifying tests as part of a buildLisp program or library. Change-Id: I733213c1618f0fa60f645465560bce0522641efd Reviewed-on: https://cl.tvl.fyi/c/depot/+/1481 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-07-26 r/1487 fix(nix/buildLisp): Set LANG to C.UTF-8 on program buildsGriffin Smith1-0/+1
This was already happening for libraries, but not for programs - as a result, programs built with libraries that contained unicode (eg cl-unicode, uax-15, ...) would fail to build due to character encoding issues when loading the FASLs. Change-Id: I66149b585e85b213d0c026153140a1925536bd29 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1469 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-07-06 r/1228 fix(buildLisp): use full store path in FASL output pathnameseta1-1/+1
If you compiled dirA/test.lisp and dirB/test.lisp in the same library, they'd both get written to /test.fasl and the second would overwrite the first. Instead, use the whole store path (with / swapped for -) as the fasl filename. Change-Id: I4eb88b5d33757751e1f67e72ed328bd58079b1b9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/944 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-02-21 r/559 chore: Rename pkgs->depot in all Nix file headersVincent Ambo2-5/+4
2020-01-29 r/473 fix(nix/buildLisp): Ensure SBCL uses UTF-8 encodingVincent Ambo1-0/+1
2020-01-29 r/471 docs(nix/buildLisp): Update the README with actual docsVincent Ambo1-11/+86
2020-01-26 r/461 feat(nix/buildLisp): Add 'bundled' function for built-in librariesVincent Ambo1-0/+8
Makes it possible to add virtual dependencies on built-in libraries, e.g. `buildLisp.bundled "sb-posix"`.
2020-01-24 r/455 chore(buildLisp): use lib.optionalString where applicableedef1-4/+1
2020-01-17 r/386 fix(nix/buildLisp): Don't load binaries in sbclWithVincent Ambo1-3/+11
Adds an attribute on each Lisp derivation that specifies whether it is a binary or not. This attribute is then filtered for in sbclWith.
2020-01-17 r/385 feat(nix/buildLisp): Support passing programs to sbclWithVincent Ambo1-1/+1
Adds the necessary attributes on derivations created by buildLisp.program for them to be passed to buildLisp.sbclWith. This makes it possible to easily spin up Lisp environments that contain everything needed for a given program.
2020-01-09 r/365 fix(buildLisp): Wrap executables to set load paths correctlyVincent Ambo2-16/+10
I can not currently find a way to set the CFFI variables correctly to get it to load libraries from Nix. In the absence of that feature, a wrapper also does the trick.
2020-01-09 r/364 feat(buildLisp): Initial implementation of foreign library loadingVincent Ambo1-9/+46
Adds a new 'native' parameter to the buildLisp functions in which libraries can be passed in. This does not yet work with CFFI packages.
2020-01-09 r/355 fix(buildLisp): Perform a topological sort of dependenciesVincent Ambo1-8/+7
This ensures that dependencies are loaded in the correct order in larger dependency graphs.
2020-01-08 r/351 fix(buildLisp): Cursed code to fix load orderingVincent Ambo1-10/+23
It's not enough to compile in the right order - turns out you also have to load the compiled objects in the right order. To achieve this some cursed code has been added that changes the Lisp generated by Nix to compile the other Lisp so that it also generates some bash, which Nix can then use to concatenate the FASLs in the right order to feed them to Lisp again. It works but I'll replace it with a more elegant solution once one is needed.
2020-01-08 r/350 feat(buildLisp): Add initial, tiny example programVincent Ambo3-0/+45
2020-01-08 r/349 feat(buildLisp): Implement buildLisp.program to dump executablesVincent Ambo1-4/+30
Dumps the executable image from SBCL to $out/bin/$name. Image compression is disabled.
2020-01-08 r/348 refactor(buildLisp): Inline dependency loading in genCompileLispVincent Ambo1-35/+44