git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #55772 from xtruder/pkgs/rippled/1.2.0

rippled: 0.30.0-rc1 -> 1.2.0

commitc70de6b0c4eb69c283fffef234aaf2930ba79b0e authorJaka Hudoklin <offlinehacker@users.noreply.github.com> dateFri 15 Feb 2019, 16:52 (8 years ago) parent64b05b86dde3a2
2 files changed+129−14
pkgs/servers/rippled/default.nix+128−13 pkgs/top-level/all-packages.nix+1−1
pkgs/servers/rippled/default.nix+128−13
@@ -1,26 +1,142 @@
1−{ stdenv, fetchFromGitHub, scons, pkgconfig, openssl, protobuf, boost, zlib}:
1+{ stdenv, fetchFromGitHub, fetchgit, fetchurl, git, cmake, pkgconfig
2+, openssl, boost, zlib }:
23
3−stdenv.mkDerivation rec {
4+let
5+ sqlite3 = fetchurl {
6+ url = "https://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip";
7+ sha256 = "0vh9aa5dyvdwsyd8yp88ss300mv2c2m40z79z569lcxa6fqwlpfy";
8+ };
9+
10+ beast = fetchgit {
11+ url = "https://github.com/boostorg/beast.git";
12+ rev = "2f9a8440c2432d8a196571d6300404cb76314125";
13+ sha256 = "1n9ms5cn67b0p0mhldz5psgylds22sm5x22q7knrsf20856vlk5a";
14+ fetchSubmodules = false;
15+ leaveDotGit = true;
16+ };
17+
18+ docca = fetchgit {
19+ url = "https://github.com/vinniefalco/docca.git";
20+ rev = "335dbf9c3613e997ed56d540cc8c5ff2e28cab2d";
21+ sha256 = "09cb90k0ygmnlpidybv6nzf6is51i80lnwlvad6ijc3gf1z6i1yh";
22+ fetchSubmodules = false;
23+ leaveDotGit = true;
24+ };
25+
26+ rocksdb = fetchgit {
27+ url = "https://github.com/facebook/rocksdb.git";
28+ rev = "a297643f2e327a8bc7061bfc838fdf11935a2cf2";
29+ sha256 = "00z8i4fwr27j9d4ymnls7rcgfvm6xh36a4hy2m2njx4x513pgyzw";
30+ fetchSubmodules = false;
31+ leaveDotGit = true;
32+ };
33+
34+ lz4 = fetchgit rec {
35+ url = "https://github.com/lz4/lz4.git";
36+ rev = "v1.8.2";
37+ sha256 = "1niv553q60hwn95yflzmrqkp1046hrid13h0yr36lm4fjza21h9w";
38+ leaveDotGit = true;
39+ fetchSubmodules = false;
40+ postFetch = "cd $out && git tag ${rev}";
41+ };
42+
43+ libarchive = fetchgit rec {
44+ url = "https://github.com/libarchive/libarchive.git";
45+ rev = "v3.3.3";
46+ sha256 = "165imgfmizpi4ffpiwfs8gxysn6lw3y1fxj5rga98filkl7hxs31";
47+ leaveDotGit = true;
48+ fetchSubmodules = false;
49+ postFetch = "cd $out && git tag ${rev}";
50+ };
51+
52+ soci = fetchgit rec {
53+ url = "https://github.com/SOCI/soci.git";
54+ rev = "3a1f602b3021b925d38828e3ff95f9e7f8887ff7";
55+ sha256 = "0lnps42cidlrn43h13b9yc8cs3fwgz7wb6a1kfc9rnw7swkh757f";
56+ leaveDotGit = true;
57+ fetchSubmodules = false;
58+ };
59+
60+ snappy = fetchgit rec {
61+ url = "https://github.com/google/snappy.git";
62+ rev = "1.1.7";
63+ sha256 = "1f0i0sz5gc8aqd594zn3py6j4w86gi1xry6qaz2vzyl4w7cb4v35";
64+ leaveDotGit = true;
65+ fetchSubmodules = false;
66+ postFetch = "cd $out && git tag ${rev}";
67+ };
68+
69+ nudb = fetchgit rec {
70+ url = "https://github.com/vinniefalco/NuDB.git";
71+ rev = "1.0.0";
72+ sha256 = "142bxicv25xaw4fmpw8bbblb1grdw30wyj181xl4a5734zw3qgmz";
73+ leaveDotGit = true;
74+ fetchSubmodules = false;
75+ postFetch = "cd $out && git tag ${rev}";
76+ };
77+
78+ protobuf = fetchgit rec {
79+ url = "https://github.com/protocolbuffers/protobuf.git";
80+ rev = "v3.6.1";
81+ sha256 = "0zl09q25ggfw95lakcs3mkq5pvsj17mx29b4nqr09g0mnbw9709c";
82+ leaveDotGit = true;
83+ fetchSubmodules = false;
84+ postFetch = "cd $out && git tag ${rev}";
85+ };
86+
87+ google-test = fetchgit rec {
88+ url = "https://github.com/google/googletest.git";
89+ rev = "c3bb0ee2a63279a803aaad956b9b26d74bf9e6e2";
90+ sha256 = "0pj5b6jnrj5lrccz2disr8hklbnzd8hwmrwbfqmvhiwb9q9p0k2k";
91+ leaveDotGit = true;
92+ fetchSubmodules = false;
93+ };
94+
95+ google-benchmark = fetchgit rec {
96+ url = "https://github.com/google/benchmark.git";
97+ rev = "5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8";
98+ sha256 = "0qg70j47zqnrbszlgrzmxpr4g88kq0gyq6v16bhaggfm83c6mg6i";
99+ leaveDotGit = true;
100+ fetchSubmodules = false;
101+ };
102+in stdenv.mkDerivation rec {
4103 name = "rippled-${version}";
5− version = "0.30.0-rc1";
104+ version = "1.2.0";
6105
7106 src = fetchFromGitHub {
8107 owner = "ripple";
9108 repo = "rippled";
10109 rev = version;
11− sha256 = "0l1dg29mg6wsdkh0lwi2znpl2wcm6bs6d3lswk5g1m1nk2mk7lr7";
110+ sha256 = "1zx8qs32v5ibkwm9nm6m0qh0gcr0vcigr2wbxpd40pqqk73cqb3q";
12111 };
13112
14− postPatch = ''
15− sed -i -e "s@ENV = dict.*@ENV = os.environ@g" SConstruct
16− '';
113+ hardeningDisable = ["format"];
114+ cmakeFlags = ["-Dstatic=OFF"];
115+
116+ nativeBuildInputs = [ pkgconfig cmake git ];
117+ buildInputs = [ openssl openssl.dev boost zlib ];
17118
18− nativeBuildInputs = [ pkgconfig scons ];
19− buildInputs = [ openssl protobuf boost zlib ];
119+ preConfigure = ''
120+ export HOME=$PWD
121+
122+ git config --global url."file://${beast}".insteadOf "https://github.com/vinniefalco/Beast.git"
123+ git config --global url."file://${docca}".insteadOf "https://github.com/vinniefalco/docca.git"
124+ git config --global url."file://${rocksdb}".insteadOf "https://github.com/facebook/rocksdb.git"
125+ git config --global url."file://${lz4}".insteadOf "${lz4.url}"
126+ git config --global url."file://${libarchive}".insteadOf "${libarchive.url}"
127+ git config --global url."file://${soci}".insteadOf "${soci.url}"
128+ git config --global url."file://${snappy}".insteadOf "${snappy.url}"
129+ git config --global url."file://${nudb}".insteadOf "${nudb.url}"
130+ git config --global url."file://${protobuf}".insteadOf "${protobuf.url}"
131+ git config --global url."file://${google-benchmark}".insteadOf "${google-benchmark.url}"
132+ git config --global url."file://${google-test}".insteadOf "${google-test.url}"
133+
134+ substituteInPlace CMakeLists.txt --replace "URL https://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip" "URL ${sqlite3}"
135+ '';
20136
21− postInstall = ''
22− mkdir -p $out/bin
23− cp build/rippled $out/bin/
137+ doCheck = true;
138+ checkPhase = ''
139+ ./rippled --unittest
24140 '';
25141
26142 meta = with stdenv.lib; {
@@ -29,6 +145,5 @@ stdenv.mkDerivation rec {
29145 maintainers = with maintainers; [ ehmry offline ];
30146 license = licenses.isc;
31147 platforms = [ "x86_64-linux" ];
32− broken = true;
33148 };
34149}
pkgs/top-level/all-packages.nix+1−1
@@ -13992,7 +13992,7 @@ in
1399213992 };
1399313993
1399413994 rippled = callPackage ../servers/rippled {
13995− boost = boost159;
13995+ boost = boost167;
1399613996 };
1399713997
1399813998 s6 = skawarePackages.s6;