8 Commits

Author SHA1 Message Date
dd7bea6efd Build Rust crate with Nix via crane sub-flake
Move Rust build into its own flake at rust/flake.nix using crane, and
reference it as an input from the top-level flake. The Haskell build
gets the Rust artifacts (header + static lib) via a haskell.nix
override that symlinks them into place before configure.

Use Cabal's Cgarnet_rs naming convention for extra-bundled-libraries
to satisfy the shared library install phase naming requirements.

Also extract inputs.nix, default.nix, and shell.nix for flake-compat
(nix-build / nix-shell) support.
2026-03-25 16:30:55 +09:00
George Thomas
649c1b466f Revert "Ditch Bash script for custom setup"
This reverts commit 1f1c0d959da699ce04f7951ecbcdb7976c8c0750.

This doesn't work well with multi-component builds. For example, it requires `"haskell.sessionLoading": "singleComponent"` in VSCode, which makes HLS work less reliably.
2026-03-24 11:24:40 +00:00
George Thomas
b79a4c0804 Ditch Bash script for custom setup 2026-03-24 11:24:40 +00:00
George Thomas
4ecd0b16e2 Drop build hooks in favour of just using bundled libraries properly
The script addition is a bit hacky, but there's no obvious straightforward arch/version-independent way to get most of the build path. And eventually, once issues with HLS etc. are sorted out we will revert to using Cabal hooks anyway.
2026-03-23 23:06:29 +00:00
George Thomas
ddb9c300cf Switch to Hooks API instead of using cabal configure hack for lib/include dirs 2026-03-23 22:57:34 +00:00
George Thomas
96ec5c1cb1 Switch to Template Haskell mode for hs-bindgen 2026-02-20 09:08:16 +00:00
George Thomas
58005ee261 Refactor to use continuation monad 2026-02-19 21:18:37 +00:00
George Thomas
25875c7dc1 Move Haskell package to top level 2026-02-19 16:29:52 +00:00