nixpkgs/pkgs/development/tools/fq/default.nix

38 lines
699 B
Nix
Raw Normal View History

2021-12-23 13:29:49 +03:00
{ lib
, buildGoModule
2021-12-23 13:29:49 +03:00
, fetchFromGitHub
, fq
, testVersion
}:
2021-12-23 11:39:11 +03:00
buildGoModule rec {
2021-12-23 11:39:11 +03:00
pname = "fq";
2022-03-22 08:08:46 +03:00
version = "0.0.6";
2021-12-23 11:39:11 +03:00
src = fetchFromGitHub {
owner = "wader";
repo = "fq";
rev = "v${version}";
2022-03-22 08:08:46 +03:00
sha256 = "sha256-/9TBnhFGYNOcCsQKUF0uuJEgnF+qRGly/5z1s3sYhqY=";
2021-12-23 11:39:11 +03:00
};
2022-03-22 08:08:46 +03:00
vendorSha256 = "sha256-zvtYyNJO4QoTes3vf6CFa3dYMJqkp0PG9pnOk+aO97Y=";
2021-12-23 11:39:11 +03:00
2021-12-23 13:29:49 +03:00
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
2022-03-22 08:08:46 +03:00
subPackages = [ "." ];
2021-12-23 13:29:49 +03:00
passthru.tests = testVersion { package = fq; };
2021-12-23 11:39:11 +03:00
meta = with lib; {
description = "jq for binary formats";
homepage = "https://github.com/wader/fq";
license = licenses.mit;
maintainers = with maintainers; [ siraben ];
};
}