diff options
author | Benjamin Staffin <benley@gmail.com> | 2024-01-31 13:57:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-31 13:57:11 -0500 |
commit | 215701875d8468071fecfbca276ff5b757dcf297 (patch) | |
tree | 732bada87a6017471d46248e186f6c56e888bb06 | |
parent | 9e485b216944d6e52d91277b03e90368a0a1c78a (diff) |
dex-oidc: Fix embedded version string, add test (#285104)
Followup to #283991
-rw-r--r-- | pkgs/servers/dex/default.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/servers/dex/default.nix b/pkgs/servers/dex/default.nix index 7db4d836ee1b0..16a792f111f0c 100644 --- a/pkgs/servers/dex/default.nix +++ b/pkgs/servers/dex/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, nixosTests }: +{ lib, buildGoModule, fetchFromGitHub, nixosTests, testers, dex-oidc }: buildGoModule rec { pname = "dex"; @@ -18,7 +18,7 @@ buildGoModule rec { ]; ldflags = [ - "-w" "-s" "-X github.com/dexidp/dex/version.Version=${src.rev}" + "-w" "-s" "-X main.version=${src.rev}" ]; postInstall = '' @@ -26,7 +26,14 @@ buildGoModule rec { cp -r $src/web $out/share/web ''; - passthru.tests = { inherit (nixosTests) dex-oidc; }; + passthru.tests = { + inherit (nixosTests) dex-oidc; + version = testers.testVersion { + package = dex-oidc; + command = "dex version"; + version = "v${version}"; + }; + }; meta = with lib; { description = "OpenID Connect and OAuth2 identity provider with pluggable connectors"; |