2021-01-15 22:18:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
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";
|
2021-01-15 22:18:51 +00:00
|
|
|
version = "2.27.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dexidp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-01-15 22:18:51 +00:00
|
|
|
sha256 = "0n66nm91qcmm00mz8f8x39xqr3y05qxk34fvka53s6xax1gxvxxi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
vendorSha256 = "1k87q3ic02n2b632y3lmnclac1iaidmsl3f9py61myi5r02p03lp";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/dex"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildFlagsArray = [
|
2021-01-15 22:18:51 +00:00
|
|
|
"-ldflags=-w -s -X github.com/dexidp/dex/version.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
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "OpenID Connect and OAuth2 identity provider with pluggable connectors";
|
|
|
|
homepage = "https://github.com/dexidp/dex";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ benley ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|