Ditch Bash script for custom setup
This commit is contained in:
parent
6d6bb4ba58
commit
1f1c0d959d
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 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,6 +6,13 @@ 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
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
#!/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