nixpkgs/pkgs/servers/dex/default.nix
2022-09-16 12:20:14 -04:00

38 lines
910 B
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "dex";
version = "2.34.0";
src = fetchFromGitHub {
owner = "dexidp";
repo = pname;
rev = "v${version}";
sha256 = "sha256-OML1DMIuFzoIyXtWxZW+lE/yU0B+7gx61v9CTb6MNmM=";
};
vendorSha256 = "sha256-qMkU4OQtoOYFF9vexZ+SH0E/4xo+WARIqQrbsMPm/C8=";
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;
};
}