2021-12-23 10:29:49 +00:00
|
|
|
{ lib
|
2022-02-04 12:16:47 +00:00
|
|
|
, buildGoModule
|
2021-12-23 10:29:49 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fq
|
2022-04-20 14:40:48 +00:00
|
|
|
, testers
|
2021-12-23 10:29:49 +00:00
|
|
|
}:
|
2021-12-23 08:39:11 +00:00
|
|
|
|
2022-02-04 12:16:47 +00:00
|
|
|
buildGoModule rec {
|
2021-12-23 08:39:11 +00:00
|
|
|
pname = "fq";
|
2022-11-25 01:09:12 +00:00
|
|
|
version = "0.1.0";
|
2021-12-23 08:39:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wader";
|
|
|
|
repo = "fq";
|
|
|
|
rev = "v${version}";
|
2022-11-25 01:09:12 +00:00
|
|
|
sha256 = "sha256-ZUbeAZGHG7I4NwJZjI92isIMX8M675oI833v3uKZE7U=";
|
2021-12-23 08:39:11 +00:00
|
|
|
};
|
|
|
|
|
2022-11-25 01:09:12 +00:00
|
|
|
vendorSha256 = "sha256-GGbKoLj8CyfqB90QnOsomZBVd6KwJCTp/MeyKvRopSQ=";
|
2021-12-23 08:39:11 +00:00
|
|
|
|
2021-12-23 10:29:49 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
2022-03-22 05:08:46 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-04-20 14:40:48 +00:00
|
|
|
passthru.tests = testers.testVersion { package = fq; };
|
2021-12-23 10:29:49 +00:00
|
|
|
|
2021-12-23 08:39:11 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "jq for binary formats";
|
|
|
|
homepage = "https://github.com/wader/fq";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
};
|
|
|
|
}
|