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