diff --git a/pkgs/applications/blockchains/gridcoin-research/default.nix b/pkgs/applications/blockchains/gridcoin-research/default.nix deleted file mode 100644 index a3c8c3f8e897..000000000000 --- a/pkgs/applications/blockchains/gridcoin-research/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - fetchFromGitHub, - stdenv, - lib, - openssl, - boost, - curl, - libevent, - libzip, - qrencode, - qtbase, - qttools, - wrapQtAppsHook, - autoreconfHook, - pkg-config, - libtool, - miniupnpc, - hexdump, - fetchpatch2, -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "gridcoin-research"; - version = "5.4.9.0"; - - src = fetchFromGitHub { - owner = "gridcoin-community"; - repo = "Gridcoin-Research"; - rev = "${finalAttrs.version}"; - hash = "sha256-nupZB4nNbitpf5EBCNy0e+ovjayAszup/r7qxbxA5jI="; - }; - - patches = [ - (fetchpatch2 { - url = "https://github.com/gridcoin-community/Gridcoin-Research/commit/bab91e95ca8c83f06dcc505e6b3f8b44dc6d50d4.patch"; - sha256 = "sha256-GzurVlR7Tk3pmQfgO9WtHXjX6xHqNzdYqOdbJND7MpA="; - }) - ]; - - nativeBuildInputs = [ - pkg-config - wrapQtAppsHook - autoreconfHook - libtool - hexdump - ]; - - buildInputs = [ - qttools - qtbase - qrencode - libevent - libzip - openssl - boost - miniupnpc - curl - ]; - - configureFlags = [ - "--with-gui=qt5" - "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" - "--with-qrencode" - "--with-boost-libdir=${boost.out}/lib" - ]; - - enableParallelBuilding = true; - - meta = { - description = "POS-based cryptocurrency that rewards users for participating on the BOINC network"; - longDescription = '' - A POS-based cryptocurrency that rewards users for participating on the BOINC network, - using peer-to-peer technology to operate with no central authority - managing transactions, - issuing money and contributing to scientific research are carried out collectively by the network - ''; - homepage = "https://gridcoin.us/"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ gigglesquid ]; - platforms = lib.platforms.linux; - }; -}) diff --git a/pkgs/by-name/gr/gridcoin-research/package.nix b/pkgs/by-name/gr/gridcoin-research/package.nix new file mode 100644 index 000000000000..a8df0e918ff6 --- /dev/null +++ b/pkgs/by-name/gr/gridcoin-research/package.nix @@ -0,0 +1,91 @@ +{ + stdenv, + lib, + fetchFromGitHub, + qt6, + + # nativeBuildInputs + cmake, + pkg-config, + + # buildInputs + boost, + curl, + libevent, + libzip, + miniupnpc, + openssl, + qrencode, + + # options + withGui ? true, + withDbus ? withGui, + withQrencode ? withGui, + withUpnp ? false, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = if withGui then "gridcoin-research" else "gridcoin-researchd"; + version = "5.5.0.0"; + + src = fetchFromGitHub { + owner = "gridcoin-community"; + repo = "Gridcoin-Research"; + tag = "${finalAttrs.version}"; + hash = "sha256-PN0yDVHlty+4CcRfMWe4LG6wHXaTOyLo7lxtrVCSLHA="; + }; + + strictDeps = true; + __structuredAttrs = true; + + nativeBuildInputs = [ + cmake + pkg-config + ] + ++ lib.optionals withGui [ qt6.wrapQtAppsHook ]; + + buildInputs = [ + boost + curl + libevent + libzip + openssl + ] + ++ lib.optionals withGui [ + qt6.qt5compat + qt6.qtbase + qt6.qtcharts + qt6.qttools + ] + ++ lib.optionals withQrencode [ + qrencode + ] + ++ lib.optionals withUpnp [ + miniupnpc + ]; + + cmakeFlags = [ + (lib.cmakeBool "ENABLE_PIE" true) + (lib.cmakeBool "ENABLE_GUI" withGui) + (lib.cmakeBool "USE_QT6" withGui) + (lib.cmakeBool "USE_DBUS" withDbus) + (lib.cmakeBool "ENABLE_QRENCODE" withQrencode) + (lib.cmakeBool "ENABLE_UPNP" withUpnp) + (lib.cmakeBool "DEFAULT_UPNP" withUpnp) + ]; + + meta = { + description = "POS-based cryptocurrency that rewards users for participating on the BOINC network"; + longDescription = '' + A POS-based cryptocurrency that rewards users for participating on the BOINC network, + using peer-to-peer technology to operate with no central authority - managing transactions, + issuing money and contributing to scientific research are carried out collectively by the network + ''; + homepage = "https://gridcoin.us/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ gigglesquid ]; + platforms = lib.platforms.linux; + changelog = "https://github.com/gridcoin-community/Gridcoin-Research/releases/tag/${finalAttrs.src.tag}"; + mainProgram = if withGui then "gridcoinresearch" else "gridcoinresearchd"; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1822117c8035..61a2b39ac2b4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10796,9 +10796,7 @@ with pkgs; inherit (darwin) autoSignDarwinBinariesHook; }; - gridcoin-research = libsForQt5.callPackage ../applications/blockchains/gridcoin-research { - boost = boost179; - }; + gridcoin-researchd = gridcoin-research.override { withGui = false; }; groestlcoin = libsForQt5.callPackage ../applications/blockchains/groestlcoin { withGui = true;