diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2021-07-16 14:57:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 14:57:12 +0200 |
commit | 6d049fcad132f1f05336fcf373ec009d0d9a62cc (patch) | |
tree | 21b913ae0e5cebf8b3b164b66baa1a6bead9ba5a /pkgs/applications/blockchains | |
parent | 52ea0f4aff16378fa86b6583686d005617195acb (diff) | |
parent | 58c7f3149db499692a67acc26fa47390269b3bec (diff) |
Merge pull request #130324 from prusnak/elements
elements: init at 0.18.1.12
Diffstat (limited to 'pkgs/applications/blockchains')
-rw-r--r-- | pkgs/applications/blockchains/elements.nix | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/pkgs/applications/blockchains/elements.nix b/pkgs/applications/blockchains/elements.nix new file mode 100644 index 0000000000000..c44f2078dae3c --- /dev/null +++ b/pkgs/applications/blockchains/elements.nix @@ -0,0 +1,86 @@ +{ lib +, stdenv +, fetchurl +, autoreconfHook +, pkg-config +, util-linux +, hexdump +, wrapQtAppsHook ? null +, boost +, libevent +, miniupnpc +, zeromq +, zlib +, db48 +, sqlite +, qrencode +, qtbase ? null +, qttools ? null +, python3 +, openssl +, withGui +, withWallet ? true +}: + +with lib; +stdenv.mkDerivation rec { + pname = if withGui then "elements" else "elementsd"; + version = "0.18.1.12"; + + src = fetchurl { + url = "https://github.com/ElementsProject/elements/archive/elements-${version}.tar.gz"; + sha256 = "84a51013596b09c62913649ac90373622185f779446ee7e65b4b258a2876609f"; + }; + + nativeBuildInputs = + [ autoreconfHook pkg-config ] + ++ optionals stdenv.isLinux [ util-linux ] + ++ optionals stdenv.isDarwin [ hexdump ] + ++ optionals withGui [ wrapQtAppsHook ]; + + buildInputs = [ boost libevent miniupnpc zeromq zlib openssl ] + ++ optionals withWallet [ db48 sqlite ] + ++ optionals withGui [ qrencode qtbase qttools ]; + + configureFlags = [ + "--with-boost-libdir=${boost.out}/lib" + "--disable-bench" + ] ++ optionals (!doCheck) [ + "--disable-tests" + "--disable-gui-tests" + ] ++ optionals (!withWallet) [ + "--disable-wallet" + ] ++ optionals withGui [ + "--with-gui=qt5" + "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" + ]; + + checkInputs = [ python3 ]; + + doCheck = true; + + checkFlags = + [ "LC_ALL=C.UTF-8" ] + # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. + # See also https://github.com/NixOS/nixpkgs/issues/24256 + ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; + + enableParallelBuilding = true; + + meta = { + description = "Open Source implementation of advanced blockchain features extending the Bitcoin protocol"; + longDescription= '' + The Elements blockchain platform is a collection of feature experiments and extensions to the + Bitcoin protocol. This platform enables anyone to build their own businesses or networks + pegged to Bitcoin as a sidechain or run as a standalone blockchain with arbitrary asset + tokens. + ''; + homepage = "https://www.github.com/ElementsProject/elements"; + maintainers = with maintainers; [ prusnak ]; + license = licenses.mit; + platforms = platforms.unix; + # Qt GUI is currently broken in upstream + # No rule to make target 'qt/res/rendered_icons/about.png', needed by 'qt/qrc_bitcoin.cpp'. + broken = withGui; + }; +} |