From 4ebb399c1e034bfbfe7a8c3f0ae0220c62b61bc1 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Thu, 23 Dec 2021 11:29:49 +0100 Subject: [PATCH] fq: add testVersion --- pkgs/development/tools/fq/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/fq/default.nix b/pkgs/development/tools/fq/default.nix index 58bad88a6303..5d1c730e925b 100644 --- a/pkgs/development/tools/fq/default.nix +++ b/pkgs/development/tools/fq/default.nix @@ -1,4 +1,9 @@ -{ lib, buildGo117Module, fetchFromGitHub }: +{ lib +, buildGo117Module +, fetchFromGitHub +, fq +, testVersion +}: buildGo117Module rec { pname = "fq"; @@ -13,6 +18,14 @@ buildGo117Module rec { vendorSha256 = "sha256-89rSpxhP35wreo+0AqM+rDICCPchF+yFVvrTtZ2Xwr4="; + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + ]; + + passthru.tests = testVersion { package = fq; }; + meta = with lib; { description = "jq for binary formats"; homepage = "https://github.com/wader/fq";