a3d4720129
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, sq }:
|
|
|
|
buildGoModule rec {
|
|
pname = "sq";
|
|
version = "0.18.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "neilotoole";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-x5NHMTyOZSGOnAUCRu1qZggU5m832TFrBTSNJU6DUKo=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-IRuwX+VF0ltASTt/QKlZ3A00tgDhc9qpBfzhINp3HgQ=";
|
|
|
|
proxyVendor = true;
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
# Some tests violates sandbox constraints.
|
|
doCheck = false;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/neilotoole/sq/cli/buildinfo.Version=${version}"
|
|
];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd sq \
|
|
--bash <($out/bin/sq completion bash) \
|
|
--fish <($out/bin/sq completion fish) \
|
|
--zsh <($out/bin/sq completion zsh)
|
|
'';
|
|
|
|
passthru.tests = {
|
|
version = testers.testVersion { package = sq; };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Swiss army knife for data";
|
|
homepage = "https://sq.io/";
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ raitobezarius ];
|
|
};
|
|
}
|