Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 89 lines 1.9 kB view raw
1{ 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, 20}: 21 22stdenv.mkDerivation rec { 23 pname = "vertcoin"; 24 version = "0.18.0"; 25 26 name = pname + toString (lib.optional (!withGui) "d") + "-" + version; 27 28 src = fetchFromGitHub { 29 owner = pname + "-project"; 30 repo = pname + "-core"; 31 rev = "2bd6dba7a822400581d5a6014afd671fb7e61f36"; 32 sha256 = "ua9xXA+UQHGVpCZL0srX58DDUgpfNa+AAIKsxZbhvMk="; 33 }; 34 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 ]; 48 49 nativeBuildInputs = [ 50 autoreconfHook 51 pkg-config 52 hexdump 53 ] 54 ++ lib.optionals withGui [ 55 wrapQtAppsHook 56 ]; 57 58 buildInputs = [ 59 openssl 60 boost 61 libevent 62 db4 63 zeromq 64 gmp 65 ] 66 ++ lib.optionals withGui [ 67 qtbase 68 qttools 69 protobuf 70 ]; 71 72 enableParallelBuilding = true; 73 74 configureFlags = [ 75 "--with-boost-libdir=${boost.out}/lib" 76 ] 77 ++ lib.optionals withGui [ 78 "--with-gui=qt5" 79 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" 80 ]; 81 82 meta = with lib; { 83 description = "Digital currency with mining decentralisation and ASIC resistance as a key focus"; 84 homepage = "https://vertcoin.org/"; 85 license = licenses.mit; 86 maintainers = [ maintainers.mmahut ]; 87 platforms = platforms.linux; 88 }; 89}