patch secp256k1 to make sure it's libtoolized

Having "libtoolize --copy --force" first thing in "autogen.sh" is a
totally normal thing people do, it is supposedly harmless and
idempotent, no idea why lack thereof is apparently only problematic on
NixOS.

So: when running on NixOS, libtoolize.
This commit is contained in:
Midlyx Hatrys 2023-02-26 23:48:08 +02:00
parent 9453ce6f2a
commit 3e3746d601
2 changed files with 16 additions and 0 deletions

View File

@ -279,6 +279,8 @@ versioned_http_archive(
strip_prefix = "secp256k1-{version}",
url = "https://github.com/bitcoin-core/secp256k1/archive/{version}.tar.gz",
version = "694ce8fb2d1fd8a3d641d7c33705691d41a2a860",
patch_args = ["-p1"],
patches = ["//bazel/third_party/secp256k1:{version}.patch"],
)
versioned_http_archive(

View File

@ -0,0 +1,14 @@
diff --git i/autogen.sh w/autogen.sh
index 65286b9..edcbeb9 100755
--- i/autogen.sh
+++ w/autogen.sh
@@ -1,3 +1,9 @@
#!/bin/sh
set -e
+if [ -r /etc/os-release ]; then
+ . /etc/os-release
+ if [ "$NAME" = NixOS ]; then
+ libtoolize --copy --force
+ fi
+fi
autoreconf -if --warnings=all