1{ lib
2, buildGoModule
3, fetchFromGitHub
4}:
5
6buildGoModule rec {
7 pname = "rqlite";
8 version = "8.24.7";
9
10 src = fetchFromGitHub {
11 owner = "rqlite";
12 repo = pname;
13 rev = "v${version}";
14 sha256 = "sha256-RuLc5IYy5NDexE1UHWrcJkvKgn4hQ0TkJFcbRIwxk18=";
15 };
16
17 vendorHash = "sha256-c6HQukT32jK9B48FzW0WeY7VxPkNwDipKUTrrICsaKw=";
18
19 subPackages = [ "cmd/rqlite" "cmd/rqlited" "cmd/rqbench" ];
20
21 # Leaving other flags from https://github.com/rqlite/rqlite/blob/master/package.sh
22 # since automatically retriving those is nontrivial and inessential
23 ldflags = [
24 "-s" "-w"
25 "-X github.com/rqlite/rqlite/cmd.Version=${src.rev}"
26 ];
27
28 # Tests are in a different subPackage which fails trying to access the network
29 doCheck = false;
30
31 meta = with lib; {
32 description = "The lightweight, distributed relational database built on SQLite";
33 homepage = "https://github.com/rqlite/rqlite";
34 license = licenses.mit;
35 maintainers = with maintainers; [ dit7ya ];
36 };
37}