2019-07-10 18:18:42 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2017-06-03 21:34:31 +00:00
|
|
|
|
2019-07-10 18:18:42 +00:00
|
|
|
buildGoModule rec {
|
2019-04-25 22:02:43 +00:00
|
|
|
pname = "dex";
|
2019-07-10 18:18:42 +00:00
|
|
|
version = "2.17.0";
|
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}";
|
|
|
|
sha256 = "1z94svpiwrs64m83gpfnniv0ac1fnmvywvl05f20ind1wlf8bvwn";
|
2017-06-03 21:34:31 +00:00
|
|
|
};
|
|
|
|
|
2019-07-10 18:18:42 +00:00
|
|
|
modSha256 = "043sjq547nwg5v8708nhij0g7d2j28pyn676fgbnpps35ymnywfi";
|
|
|
|
|
2017-06-03 21:34:31 +00:00
|
|
|
subPackages = [
|
|
|
|
"cmd/dex"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildFlagsArray = [
|
2019-07-10 18:18:42 +00:00
|
|
|
"-ldflags=-w -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 = ''
|
|
|
|
mkdir -p $out/share
|
2019-07-10 18:18:42 +00:00
|
|
|
cp -r $src/web $out/share/web
|
2019-04-25 22:36:27 +00:00
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ benley ];
|
|
|
|
platforms = platforms.unix;
|
2017-06-03 21:34:31 +00:00
|
|
|
};
|
|
|
|
}
|