depot/third_party/nixpkgs/pkgs/servers/dex/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

38 lines
910 B
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "dex";
version = "2.35.3";
src = fetchFromGitHub {
owner = "dexidp";
repo = pname;
rev = "v${version}";
sha256 = "sha256-sYEdlEEpO0JDPHuGC457IPUcpp5PO2BLX/Gvd/vJvWQ=";
};
vendorSha256 = "sha256-2rg99+Zv+Lj6udhld0BwFrpVsyGC0IfX5Xqc7dRN13o=";
subPackages = [
"cmd/dex"
];
ldflags = [
"-w" "-s" "-X github.com/dexidp/dex/version.Version=${src.rev}"
];
postInstall = ''
mkdir -p $out/share
cp -r $src/web $out/share/web
'';
passthru.tests = { inherit (nixosTests) dex-oidc; };
meta = with lib; {
description = "OpenID Connect and OAuth2 identity provider with pluggable connectors";
homepage = "https://github.com/dexidp/dex";
license = licenses.asl20;
maintainers = with maintainers; [ benley techknowlogick ];
platforms = platforms.unix;
};
}