garnet/garnet.cabal
George Thomas b5fd53b5ec stuff from Yuri (maybe squash?)...
things I've changed from the PR:
- dropped legacy (i.e. non-flake) compat stuff, which turns out to account for most of the diff
- dropped `packages.garnet` since it doesn't work with `nix build .#garnet`
- back to using Rust-extended packages everywhere, which _seems_ fine
the rest is just re-inlining things and other refactors

note that changes we keep are essentially:
- not using Crane's extended packages everywhere
- bumping `nix-haskell` to avoid shell hook workaround
- various changes in how we call `nix-haskell`
- using `libCgarnet_rs` name, which Cabal expects
- adding proper non-dev-shell targets, so that e.g. `nix run` works

stuff we should still take a look at:
- seems a bit weird that `garnet-rs` arg to `project.nix` was always same (and therefore now we always pass the ) - might be a mistake, and we're supposed to be using local for local build?
- similar `libCgarnet_rs.a` logic appears in three places - see if we can deduplicate to some extent somehow
- I haven't even checked all steps are necessary
2026-03-30 12:08:05 +01:00

63 lines
1.3 KiB
Plaintext

cabal-version: 3.14
name: garnet
version: 0.1.0.0
license: BSD-3-Clause
author: Patrick Aldis
maintainer:
george.thomas@obsidian.systems
patrick.aldis@obsidian.systems
common common
default-language: GHC2024
default-extensions:
BlockArguments
DeriveAnyClass
DuplicateRecordFields
ImpredicativeTypes
LexicalNegation
MultiWayIf
NamedFieldPuns
NegativeLiterals
NoFieldSelectors
NoMonomorphismRestriction
OverloadedRecordDot
OverloadedStrings
RecordWildCards
ViewPatterns
ghc-options:
-Wall
-fdefer-type-errors
build-depends:
bytestring,
extra,
mtl,
process,
text,
library
import: common
exposed-modules:
GarnetRs.Raw
GarnetRs.Wrapped
hs-source-dirs: lib
include-dirs: rust/target/debug
extra-bundled-libraries: Cgarnet_rs
build-depends:
base,
hs-bindgen,
hs-bindgen-runtime,
primitive,
template-haskell,
executable garnet
import: common
main-is: Main.hs
hs-source-dirs: exe
ghc-options:
-threaded
-rtsopts
-with-rtsopts=-N
build-depends:
base,
garnet,