2024-02-07 01:22:34 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests, testers, dex-oidc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "dex";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.41.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dexidp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
sha256 = "sha256-sYTAW1S2fAAIZSFfsgYQ46TlkZHXUtbylSImBQz68DE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-LPPYJRmei/K2zW7Mi6Y/AOvNoYQSIfXKF+qxjYTCDAc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/dex"
|
|
|
|
];
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
2024-02-07 01:22:34 +00:00
|
|
|
"-w" "-s" "-X main.version=${src.rev}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r $src/web $out/share/web
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) dex-oidc;
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = dex-oidc;
|
|
|
|
command = "dex version";
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
};
|
2021-10-01 09:20:50 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "OpenID Connect and OAuth2 identity provider with pluggable connectors";
|
|
|
|
homepage = "https://github.com/dexidp/dex";
|
|
|
|
license = licenses.asl20;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ benley techknowlogick ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "dex";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|