2021-09-19 23:43:54 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2017-06-03 21:34:31 +00:00
|
|
|
|
2021-01-12 23:10:25 +00:00
|
|
|
buildGoModule rec {
|
2019-04-25 22:02:43 +00:00
|
|
|
pname = "dex";
|
2022-10-27 17:21:02 +00:00
|
|
|
version = "2.35.3";
|
2017-06-03 21:34:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-04-25 22:02:43 +00:00
|
|
|
owner = "dexidp";
|
|
|
|
repo = pname;
|
2019-07-10 18:18:42 +00:00
|
|
|
rev = "v${version}";
|
2022-10-27 17:21:02 +00:00
|
|
|
sha256 = "sha256-sYEdlEEpO0JDPHuGC457IPUcpp5PO2BLX/Gvd/vJvWQ=";
|
2017-06-03 21:34:31 +00:00
|
|
|
};
|
|
|
|
|
2022-10-27 17:21:02 +00:00
|
|
|
vendorSha256 = "sha256-2rg99+Zv+Lj6udhld0BwFrpVsyGC0IfX5Xqc7dRN13o=";
|
2019-07-10 18:18:42 +00:00
|
|
|
|
2017-06-03 21:34:31 +00:00
|
|
|
subPackages = [
|
|
|
|
"cmd/dex"
|
|
|
|
];
|
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [
|
|
|
|
"-w" "-s" "-X github.com/dexidp/dex/version.Version=${src.rev}"
|
2017-06-03 21:34:31 +00:00
|
|
|
];
|
|
|
|
|
2019-04-25 22:36:27 +00:00
|
|
|
postInstall = ''
|
2020-04-28 01:50:57 +00:00
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r $src/web $out/share/web
|
2019-04-25 22:36:27 +00:00
|
|
|
'';
|
|
|
|
|
2021-09-19 23:43:54 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) dex-oidc; };
|
|
|
|
|
2019-07-10 18:18:42 +00:00
|
|
|
meta = with lib; {
|
2017-06-03 21:34:31 +00:00
|
|
|
description = "OpenID Connect and OAuth2 identity provider with pluggable connectors";
|
2019-07-10 18:18:42 +00:00
|
|
|
homepage = "https://github.com/dexidp/dex";
|
|
|
|
license = licenses.asl20;
|
2022-05-26 19:30:50 +00:00
|
|
|
maintainers = with maintainers; [ benley techknowlogick ];
|
2019-07-10 18:18:42 +00:00
|
|
|
platforms = platforms.unix;
|
2017-06-03 21:34:31 +00:00
|
|
|
};
|
|
|
|
}
|