nixVersions.nix_2_24: 2.24.10 -> 2.24.11 (#364176)
[NixPkgs.git] / pkgs / applications / blockchains / vertcoin / default.nix
blob056bad01dfc64143aed49a2a7455abf0a2314209
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   openssl,
7   boost,
8   libevent,
9   autoreconfHook,
10   db4,
11   pkg-config,
12   protobuf,
13   hexdump,
14   zeromq,
15   gmp,
16   withGui,
17   qtbase ? null,
18   qttools ? null,
19   wrapQtAppsHook ? null,
22 stdenv.mkDerivation rec {
23   pname = "vertcoin";
24   version = "0.18.0";
26   name = pname + toString (lib.optional (!withGui) "d") + "-" + version;
28   src = fetchFromGitHub {
29     owner = pname + "-project";
30     repo = pname + "-core";
31     rev = "2bd6dba7a822400581d5a6014afd671fb7e61f36";
32     sha256 = "ua9xXA+UQHGVpCZL0srX58DDUgpfNa+AAIKsxZbhvMk=";
33   };
35   patches = [
36     # Fix build on gcc-13 due to missing <stdexcept> headers
37     (fetchpatch {
38       name = "gcc-13-p1.patch";
39       url = "https://github.com/vertcoin-project/vertcoin-core/commit/398768769f85cc1b6ff212ed931646b59fa1acd6.patch";
40       hash = "sha256-4nnE4W0Z5HzVaJ6tB8QmyohXmt6UHUGgDH+s9bQaxhg=";
41     })
42     (fetchpatch {
43       name = "gcc-13-p2.patch";
44       url = "https://github.com/vertcoin-project/vertcoin-core/commit/af862661654966d5de614755ab9bd1b5913e0959.patch";
45       hash = "sha256-4hcJIje3VAdEEpn2tetgvgZ8nVft+A64bfWLspQtbVw=";
46     })
47   ];
49   nativeBuildInputs =
50     [
51       autoreconfHook
52       pkg-config
53       hexdump
54     ]
55     ++ lib.optionals withGui [
56       wrapQtAppsHook
57     ];
59   buildInputs =
60     [
61       openssl
62       boost
63       libevent
64       db4
65       zeromq
66       gmp
67     ]
68     ++ lib.optionals withGui [
69       qtbase
70       qttools
71       protobuf
72     ];
74   enableParallelBuilding = true;
76   configureFlags =
77     [
78       "--with-boost-libdir=${boost.out}/lib"
79     ]
80     ++ lib.optionals withGui [
81       "--with-gui=qt5"
82       "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
83     ];
85   meta = with lib; {
86     description = "Digital currency with mining decentralisation and ASIC resistance as a key focus";
87     homepage = "https://vertcoin.org/";
88     license = licenses.mit;
89     maintainers = [ maintainers.mmahut ];
90     platforms = platforms.linux;
91   };