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
11 lines
291 B
Bash
Executable File
11 lines
291 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cargo build --manifest-path ./rust/Cargo.toml
|
|
|
|
BUNDLED_LIB_DIR=$(cabal list-bin . | sed -e 's=x/garnet/build/garnet/garnet=build=g')
|
|
mkdir -p $BUNDLED_LIB_DIR
|
|
ln -sf $(pwd)/rust/target/debug/libgarnet_rs.a $BUNDLED_LIB_DIR/libCgarnet_rs.a
|
|
|
|
cabal build
|