mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
dex-oidc: Fix embedded version string, add test (#285104)
Followup to #283991
This commit is contained in:
parent
9e485b2169
commit
215701875d
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user