diff --git a/pkgs/by-name/na/namecoind/package.nix b/pkgs/by-name/na/namecoind/package.nix index ce27b8fadde6..f6bbad0dfb49 100644 --- a/pkgs/by-name/na/namecoind/package.nix +++ b/pkgs/by-name/na/namecoind/package.nix @@ -2,57 +2,74 @@ lib, stdenv, fetchFromGitHub, - fetchpatch2, - openssl, + python3, boost, libevent, autoreconfHook, db4, miniupnpc, - eject, + sqlite, pkg-config, + util-linux, hexdump, + zeromq, + zlib, + darwin, + withWallet ? true, }: stdenv.mkDerivation rec { pname = "namecoind"; - version = "25.0"; + version = "28.0"; src = fetchFromGitHub { owner = "namecoin"; repo = "namecoin-core"; - rev = "nc${version}"; - sha256 = "sha256-2KMK5Vb8osuaKbzI1aaPSYg+te+v9CEcGUkrVI6Fk54="; + tag = "nc${version}"; + hash = "sha256-r6rVgPrKz7nZ07oXw7KmVhGF4jVn6L+R9YHded+3E9k="; }; - patches = [ - # upnp: add compatibility for miniupnpc 2.2.8 - (fetchpatch2 { - url = "https://github.com/namecoin/namecoin-core/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1"; - hash = "sha256-oDvHUvwAEp0LJCf6QBESn38Bu359TcPpLhvuLX3sm6M="; - }) - ]; + nativeBuildInputs = + [ + autoreconfHook + pkg-config + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ + darwin.autoSignDarwinBinariesHook + ]; - nativeBuildInputs = [ - autoreconfHook - pkg-config - hexdump - ]; - - buildInputs = [ - openssl - boost - libevent - db4 - miniupnpc - eject - ]; + buildInputs = + [ + boost + libevent + db4 + miniupnpc + zeromq + zlib + ] + ++ lib.optionals withWallet [ sqlite ] + # building with db48 (for legacy descriptor wallet support) is broken on Darwin + ++ lib.optionals (withWallet && !stdenv.hostPlatform.isDarwin) [ db4 ]; enableParallelBuilding = true; - configureFlags = [ - "--with-boost-libdir=${boost.out}/lib" - ]; + configureFlags = + [ + "--with-boost-libdir=${boost.out}/lib" + "--disable-bench" + "--disable-gui-tests" + ] + ++ lib.optionals (!withWallet) [ + "--disable-wallet" + ]; + + nativeCheckInputs = [ python3 ]; + + doCheck = true; + + checkFlags = [ "LC_ALL=en_US.UTF-8" ]; meta = with lib; { description = "Decentralized open source information registration and transfer system based on the Bitcoin cryptocurrency";