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