ditch bash script for custom setup
eugh, but this requires "haskell.sessionLoading": "singleComponent"
This commit is contained in:
parent
927bf229a4
commit
22b6fac5b5
14
Setup.hs
Normal file
14
Setup.hs
Normal file
@ -0,0 +1,14 @@
|
||||
import Distribution.Simple
|
||||
import Distribution.Simple.LocalBuildInfo
|
||||
import Distribution.Utils.Path
|
||||
import System.Directory
|
||||
|
||||
main :: IO ()
|
||||
main =
|
||||
defaultMainWithHooks
|
||||
simpleUserHooks
|
||||
-- place static lib in position for bundling
|
||||
{ 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,6 +6,13 @@ author: Patrick Aldis
|
||||
maintainer:
|
||||
george.thomas@obsidian.systems
|
||||
patrick.aldis@obsidian.systems
|
||||
build-type: Custom
|
||||
|
||||
custom-setup
|
||||
setup-depends:
|
||||
base,
|
||||
Cabal,
|
||||
directory,
|
||||
|
||||
common common
|
||||
default-language: GHC2024
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# place static lib in position for bundling with Cabal
|
||||
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