2021-10-01 09:20:50 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
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";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2.37.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dexidp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-2u9UHummUpPljTzPNCQfHwYVeWgDOGLcGx10aVHUAZM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
vendorHash = "sha256-sSn3qpbo04DjyPD+Ogx9JUdJ/++fNYb0bAmudQjchQ0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/dex"
|
|
|
|
];
|
|
|
|
|
2021-08-27 14:25:00 +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
|
|
|
'';
|
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) dex-oidc; };
|
|
|
|
|
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;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ benley techknowlogick ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|