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.
This commit is contained in:
parent
1f1c0d959d
commit
f10c7a29a7
14
Setup.hs
14
Setup.hs
@ -1,14 +0,0 @@
|
|||||||
import Distribution.Simple
|
|
||||||
import Distribution.Simple.LocalBuildInfo
|
|
||||||
import Distribution.Utils.Path
|
|
||||||
import System.Directory
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main =
|
|
||||||
defaultMainWithHooks
|
|
||||||
simpleUserHooks
|
|
||||||
-- Place library in the location from which Cabal can bundle it.
|
|
||||||
{ buildHook = \pkg lbi hooks flags -> do
|
|
||||||
copyFile "rust/target/debug/libgarnet_rs.a" $ getSymbolicPath (buildDir lbi) </> "libgarnet_rs.a"
|
|
||||||
buildHook simpleUserHooks pkg lbi hooks flags
|
|
||||||
}
|
|
||||||
@ -6,13 +6,6 @@ author: Patrick Aldis
|
|||||||
maintainer:
|
maintainer:
|
||||||
george.thomas@obsidian.systems
|
george.thomas@obsidian.systems
|
||||||
patrick.aldis@obsidian.systems
|
patrick.aldis@obsidian.systems
|
||||||
build-type: Custom
|
|
||||||
|
|
||||||
custom-setup
|
|
||||||
setup-depends:
|
|
||||||
base,
|
|
||||||
Cabal,
|
|
||||||
directory,
|
|
||||||
|
|
||||||
common common
|
common common
|
||||||
default-language: GHC2024
|
default-language: GHC2024
|
||||||
|
|||||||
5
generate-bindings
Executable file
5
generate-bindings
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Place library in the location from which Cabal can bundle it.
|
||||||
|
cp rust/target/debug/libgarnet_rs.a $(cabal list-bin . | sed -e 's=x/garnet/build/garnet/garnet=build=g')
|
||||||
Loading…
x
Reference in New Issue
Block a user