dsq: pass version to the build
Adopted from the way the package handles its version in releases:
9a2da3c6d9/.github/workflows/releases.yml (L20)
This commit is contained in:
parent
bc50e0ec12
commit
825c7d5938
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue