2021-01-13 00:10:25 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2017-06-03 23:34:31 +02:00
|
|
|
|
2021-01-13 00:10:25 +01:00
|
|
|
buildGoModule rec {
|
2019-04-26 00:02:43 +02:00
|
|
|
pname = "dex";
|
2021-05-19 16:38:21 +02:00
|
|
|
version = "2.28.1";
|
2017-06-03 23:34:31 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-04-26 00:02:43 +02:00
|
|
|
owner = "dexidp";
|
|
|
|
repo = pname;
|
2019-07-10 20:18:42 +02:00
|
|
|
rev = "v${version}";
|
2021-05-19 16:38:21 +02:00
|
|
|
sha256 = "sha256-MdrkQ4qclylkan8y845BjLiL+W16iqRuNMmvWsKo+zw=";
|
2017-06-03 23:34:31 +02:00
|
|
|
};
|
|
|
|
|
2021-05-19 16:38:21 +02:00
|
|
|
vendorSha256 = "sha256-rAqqvnP72BQY/qbSvqNzxh2ZUlF/rP0MR/+yqJai+KY=";
|
2019-07-10 20:18:42 +02:00
|
|
|
|
2017-06-03 23:34:31 +02:00
|
|
|
subPackages = [
|
|
|
|
"cmd/dex"
|
|
|
|
];
|
|
|
|
|
2021-08-26 08:45:51 +02:00
|
|
|
ldflags = [
|
|
|
|
"-w" "-s" "-X github.com/dexidp/dex/version.Version=${src.rev}"
|
2017-06-03 23:34:31 +02:00
|
|
|
];
|
|
|
|
|
2019-04-26 00:36:27 +02:00
|
|
|
postInstall = ''
|
2020-04-28 03:50:57 +02:00
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r $src/web $out/share/web
|
2019-04-26 00:36:27 +02:00
|
|
|
'';
|
|
|
|
|
2019-07-10 20:18:42 +02:00
|
|
|
meta = with lib; {
|
2017-06-03 23:34:31 +02:00
|
|
|
description = "OpenID Connect and OAuth2 identity provider with pluggable connectors";
|
2019-07-10 20:18:42 +02:00
|
|
|
homepage = "https://github.com/dexidp/dex";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ benley ];
|
|
|
|
platforms = platforms.unix;
|
2017-06-03 23:34:31 +02:00
|
|
|
};
|
|
|
|
}
|