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