Unverified Commit 1f050319 authored by Marcin Serwin's avatar Marcin Serwin Committed by GitHub
Browse files

gridcoin-research: 5.4.9.0 -> 5.5.0.0 (#506438)

parents 491d3125 f6498328
Loading
Loading
Loading
Loading
+91 −0
Original line number Diff line number Diff line
{
  fetchFromGitHub,
  stdenv,
  lib,
  openssl,
  fetchFromGitHub,
  qt6,

  # nativeBuildInputs
  cmake,
  pkg-config,

  # buildInputs
  boost,
  curl,
  libevent,
  libzip,
  qrencode,
  qtbase,
  qttools,
  wrapQtAppsHook,
  autoreconfHook,
  pkg-config,
  libtool,
  miniupnpc,
  hexdump,
  fetchpatch2,
  openssl,
  qrencode,

  # options
  withGui ? true,
  withDbus ? withGui,
  withQrencode ? withGui,
  withUpnp ? false,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "gridcoin-research";
  version = "5.4.9.0";
  pname = if withGui then "gridcoin-research" else "gridcoin-researchd";
  version = "5.5.0.0";

  src = fetchFromGitHub {
    owner = "gridcoin-community";
    repo = "Gridcoin-Research";
    rev = "${finalAttrs.version}";
    hash = "sha256-nupZB4nNbitpf5EBCNy0e+ovjayAszup/r7qxbxA5jI=";
    tag = "${finalAttrs.version}";
    hash = "sha256-PN0yDVHlty+4CcRfMWe4LG6wHXaTOyLo7lxtrVCSLHA=";
  };

  patches = [
    (fetchpatch2 {
      url = "https://github.com/gridcoin-community/Gridcoin-Research/commit/bab91e95ca8c83f06dcc505e6b3f8b44dc6d50d4.patch";
      sha256 = "sha256-GzurVlR7Tk3pmQfgO9WtHXjX6xHqNzdYqOdbJND7MpA=";
    })
  ];
  strictDeps = true;
  __structuredAttrs = true;

  nativeBuildInputs = [
    cmake
    pkg-config
    wrapQtAppsHook
    autoreconfHook
    libtool
    hexdump
  ];
  ]
  ++ lib.optionals withGui [ qt6.wrapQtAppsHook ];

  buildInputs = [
    qttools
    qtbase
    qrencode
    boost
    curl
    libevent
    libzip
    openssl
    boost
  ]
  ++ lib.optionals withGui [
    qt6.qt5compat
    qt6.qtbase
    qt6.qtcharts
    qt6.qttools
  ]
  ++ lib.optionals withQrencode [
    qrencode
  ]
  ++ lib.optionals withUpnp [
    miniupnpc
    curl
  ];

  configureFlags = [
    "--with-gui=qt5"
    "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
    "--with-qrencode"
    "--with-boost-libdir=${boost.out}/lib"
  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)
  ];

  enableParallelBuilding = true;

  meta = {
    description = "POS-based cryptocurrency that rewards users for participating on the BOINC network";
    longDescription = ''
@@ -77,5 +85,7 @@ stdenv.mkDerivation (finalAttrs: {
    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";
  };
})
+1 −3
Original line number Diff line number Diff line
@@ -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;