2017-06-03 21:34:31 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-04-25 22:02:43 +00:00
|
|
|
pname = "dex";
|
|
|
|
version = "2.16.0";
|
2017-06-03 21:34:31 +00:00
|
|
|
|
2019-04-25 22:02:43 +00:00
|
|
|
goPackagePath = "github.com/dexidp/dex";
|
2017-06-03 21:34:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
2019-04-25 22:02:43 +00:00
|
|
|
owner = "dexidp";
|
|
|
|
repo = pname;
|
|
|
|
sha256 = "0w8nl7inqp4grbaq320dgynmznbrln8vihd799dwb2cx86laxsi1";
|
2017-06-03 21:34:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/dex"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildFlagsArray = [
|
|
|
|
"-ldflags=-w -X ${goPackagePath}/version.Version=${src.rev}"
|
|
|
|
];
|
|
|
|
|
2019-04-25 22:36:27 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r go/src/${goPackagePath}/web $out/share/web
|
|
|
|
'';
|
|
|
|
|
2017-06-03 21:34:31 +00:00
|
|
|
meta = {
|
|
|
|
description = "OpenID Connect and OAuth2 identity provider with pluggable connectors";
|
|
|
|
license = lib.licenses.asl20;
|
2019-04-25 22:02:43 +00:00
|
|
|
homepage = https://github.com/dexidp/dex;
|
2017-06-03 21:34:31 +00:00
|
|
|
maintainers = with lib.maintainers; [benley];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|