diff options
author | Olli Helenius <liff@iki.fi> | 2022-04-11 18:42:29 +0300 |
---|---|---|
committer | Olli Helenius <liff@iki.fi> | 2022-04-11 18:46:31 +0300 |
commit | 825c7d5938eb5c0f866474df4db4f074a5b31cc3 (patch) | |
tree | 6598fd2a1e79a7d1d8ceb46526b620920bd55abd /pkgs/tools/misc/dsq | |
parent | bc50e0ec126ef55b96d3d75b4ddd62c8492c2568 (diff) |
dsq: pass version to the build
Adopted from the way the package handles its version in releases: https://github.com/multiprocessio/dsq/blob/9a2da3c6d9f8db6b1e5c9209e0ddbe92d32c66d2/.github/workflows/releases.yml#L20
Diffstat (limited to 'pkgs/tools/misc/dsq')
-rw-r--r-- | pkgs/tools/misc/dsq/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/tools/misc/dsq/default.nix b/pkgs/tools/misc/dsq/default.nix index 72a38cf1eaf3f..e70913114eb9c 100644 --- a/pkgs/tools/misc/dsq/default.nix +++ b/pkgs/tools/misc/dsq/default.nix @@ -5,6 +5,7 @@ , runCommand , nix-update-script , dsq +, testVersion , diffutils }: @@ -23,10 +24,14 @@ buildGoModule rec { nativeBuildInputs = [ diffutils ]; + ldflags = [ "-X" "main.Version=${version}" ]; + passthru = { updateScript = nix-update-script { attrPath = pname; }; tests = { + version = testVersion { package = dsq; }; + pretty-csv = runCommand "${pname}-test" { } '' mkdir "$out" cat <<EOF > "$out/input.csv" |