Skip to content

Commit 1a19409

Browse files
committed
Remove dynamic libraries before building
1 parent 2fd0c68 commit 1a19409

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

build.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,16 @@ runShake pwd uid = shakeArgs options $ do
8585
needHaskellSources
8686
needDependencies
8787
installDir <- liftIO $ getXdgDirectory XdgData ""
88-
cmd_ "find" [installDir </> "lib"]
88+
let libDirectory = installDir </> "lib"
89+
liftIO $ removeFiles installDir ["//*.so", "//*.dylib"]
8990
cmd_ "cabal" ["update"]
9091
command_
91-
[AddEnv "PKG_CONFIG_PATH" (installDir </> "lib" </> "pkgconfig")]
92+
[AddEnv "PKG_CONFIG_PATH" (libDirectory </> "pkgconfig")]
9293
"cabal"
93-
["build", "all", "--ghc-options", "-L" <> installDir </> "lib" <> " -lsodium -lblst -lsecp256k1"]
94+
["build", "all", "--ghc-options", "-L" <> libDirectory <> " -lsodium -lblst -lsecp256k1"]
9495
command_
95-
[ AddEnv "LD_LIBRARY_PATH" (installDir </> "lib")
96-
, AddEnv "DYLD_FALLBACK_LIBRARY_PATH" (installDir </> "lib")
96+
[ AddEnv "LD_LIBRARY_PATH" libDirectory
97+
, AddEnv "DYLD_FALLBACK_LIBRARY_PATH" libDirectory
9798
]
9899
"cabal"
99100
["test", "all"]

scripts/install-libblst.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ BLST_VERSION=$(curl https://raw.githubusercontent.com/input-output-hk/iohk-nix/$
1111
echo "Using blst version: ${BLST_VERSION}"
1212

1313
: ${BLST_VERSION:='v0.3.11'}
14-
git clone --depth 1 --branch ${BLST_VERSION} https://github.com/supranational/blst
14+
[[ -d blst ]] || git clone --depth 1 --branch ${BLST_VERSION} https://github.com/supranational/blst
1515
cd blst
1616
./build.sh
1717
cat >libblst.pc <<EOF

0 commit comments

Comments
 (0)