nixpkgs/pkgs/by-name/rq/rqlite/package.nix
2024-11-22 18:04:12 +00:00

38 lines
990 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "rqlite";
version = "8.34.1";
src = fetchFromGitHub {
owner = "rqlite";
repo = pname;
rev = "v${version}";
sha256 = "sha256-YU2TQ+QTtrderXx2l/bqRCaNiuCOBD/jRYZ/oEKO9H4=";
};
vendorHash = "sha256-yoowUrS7UDk6sCfTYmDEVWzGBtzT7DR1vuqPWlcqRzU=";
subPackages = [ "cmd/rqlite" "cmd/rqlited" "cmd/rqbench" ];
# Leaving other flags from https://github.com/rqlite/rqlite/blob/master/package.sh
# since automatically retriving those is nontrivial and inessential
ldflags = [
"-s" "-w"
"-X github.com/rqlite/rqlite/cmd.Version=${src.rev}"
];
# Tests are in a different subPackage which fails trying to access the network
doCheck = false;
meta = with lib; {
description = "Lightweight, distributed relational database built on SQLite";
homepage = "https://github.com/rqlite/rqlite";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
};
}