bitcoin: Remove libsodium transistive dependency from bitcoin
The official binaries for bitcoin-core explicitly configure their dependencies to minimize them.
In this commit we bring the zeromq dependency closer to
https://github.com/bitcoin/bitcoin/blob/94ddc2dced5736612e358a3b80f2bc718fbd8161/depends/packages/zeromq.mk
In particular, libsodium is no longer a runtime dependency of bitcoin.
This commit is contained in:
@@ -4,11 +4,13 @@
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkg-config,
|
||||
libsodium,
|
||||
libsodium ? null,
|
||||
asciidoc,
|
||||
xmlto,
|
||||
enableCurve ? true,
|
||||
enableDrafts ? false,
|
||||
fetchpatch,
|
||||
withLibsodium ? libsodium != null,
|
||||
# for passthru.tests
|
||||
azmq,
|
||||
cppzmq,
|
||||
@@ -61,13 +63,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
xmlto
|
||||
];
|
||||
|
||||
buildInputs = [ libsodium ];
|
||||
buildInputs = lib.optionals withLibsodium [ libsodium ];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_SHARED" (!stdenv.hostPlatform.isStatic))
|
||||
(lib.cmakeBool "ENABLE_CURVE" true)
|
||||
(lib.cmakeBool "ENABLE_CURVE" enableCurve)
|
||||
(lib.cmakeBool "ENABLE_DRAFTS" enableDrafts)
|
||||
(lib.cmakeBool "WITH_LIBSODIUM" true)
|
||||
(lib.cmakeBool "WITH_LIBSODIUM" withLibsodium)
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -12546,12 +12546,16 @@ with pkgs;
|
||||
|
||||
bitcoin = qt6Packages.callPackage ../applications/blockchains/bitcoin {
|
||||
withGui = true;
|
||||
zeromq = zeromq.override {
|
||||
enableCurve = false;
|
||||
enableDrafts = false;
|
||||
libsodium = null;
|
||||
};
|
||||
inherit (darwin) autoSignDarwinBinariesHook;
|
||||
};
|
||||
|
||||
bitcoind = callPackage ../applications/blockchains/bitcoin {
|
||||
bitcoind = bitcoin.override {
|
||||
withGui = false;
|
||||
inherit (darwin) autoSignDarwinBinariesHook;
|
||||
};
|
||||
|
||||
bitcoin-knots = libsForQt5.callPackage ../applications/blockchains/bitcoin-knots {
|
||||
|
||||
Reference in New Issue
Block a user