diff --git a/Setup.hs b/Setup.hs deleted file mode 100644 index 4d25b82..0000000 --- a/Setup.hs +++ /dev/null @@ -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 - } diff --git a/garnet.cabal b/garnet.cabal index 8c631eb..52f65d4 100644 --- a/garnet.cabal +++ b/garnet.cabal @@ -6,13 +6,6 @@ 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 diff --git a/generate-bindings b/generate-bindings new file mode 100755 index 0000000..39111ba --- /dev/null +++ b/generate-bindings @@ -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')