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 final question: it does seems a bit weird that `garnet-rs` arg to `project.nix` was always the same might be a mistake, and we're supposed to be using local for local build? "improve nix-haskell use" there are a few things going on here but the main ones are ... note that changes we keep are essentially: - 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
63 lines
1.3 KiB
Plaintext
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,
|