diff --git a/mmgen/data/version b/mmgen/data/version index 2ac0ff52..53125b7b 100644 --- a/mmgen/data/version +++ b/mmgen/data/version @@ -1 +1 @@ -16.1.dev6 +16.1.dev7 diff --git a/nix/bitcoin.nix b/nix/bitcoin.nix new file mode 100644 index 00000000..3da98315 --- /dev/null +++ b/nix/bitcoin.nix @@ -0,0 +1,80 @@ +{ + lib, + stdenv, + cmake, + capnproto, + pkg-config, + darwin, + boost, + libevent, + zeromq, + zlib, + sqlite, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "bitcoind"; + version = "30.0"; + + src = fetchGit { + url = "https://github.com/bitcoin/bitcoin.git"; + # url = /path/to/repo/bitcoin-30.0; + ref = "refs/tags/v${finalAttrs.version}"; + shallow = true; + }; + + nativeBuildInputs = [ + cmake + capnproto + pkg-config + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ + darwin.autoSignDarwinBinariesHook + ]; + + buildInputs = [ + boost + libevent + zeromq + zlib + sqlite + ]; + + cmakeFlags = [ + (lib.cmakeBool "BUILD_BENCH" false) + (lib.cmakeBool "WITH_ZMQ" true) + (lib.cmakeBool "BUILD_TESTS" false) + (lib.cmakeBool "BUILD_FUZZ_BINARY" false) + ]; + + NIX_LDFLAGS = lib.optionals ( + stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic + ) "-levent_core"; + + doCheck = false; + + enableParallelBuilding = true; + + __darwinAllowLocalNetworking = true; + + doInstallCheck = false; + + meta = { + description = "Peer-to-peer electronic cash system"; + longDescription = '' + Bitcoin is a free open source peer-to-peer electronic cash system that is + completely decentralized, without the need for a central server or trusted + parties. Users hold the crypto keys to their own money and transact directly + with each other, with the help of a P2P network to check for double-spending. + ''; + homepage = "https://bitcoin.org/en/"; + downloadPage = "https://bitcoincore.org/bin/bitcoin-core-${finalAttrs.version}/"; + changelog = "https://bitcoincore.org/en/releases/${finalAttrs.version}/"; + maintainers = with lib.maintainers; [ + prusnak + roconnor + ]; + license = lib.licenses.mit; + platforms = lib.platforms.unix; + }; +}) diff --git a/nix/packages.nix b/nix/packages.nix index 05e8bf2c..815b7b30 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -2,7 +2,7 @@ { system-packages = with pkgs; { - bitcoind = bitcoind; # Bitcoin Core daemon + bitcoind = (callPackage ./bitcoin.nix {}); # Bitcoin Core daemon vanitygen = (callPackage ./vanitygen-plusplus.nix {}); # test suite curl = curl; git = git;