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