1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 17:41:12 +00:00
nixpkgs/pkgs/servers/dex/default.nix
2021-09-25 13:12:51 +02:00

39 lines
895 B
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "dex";
version = "2.30.0";
src = fetchFromGitHub {
owner = "dexidp";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Z/X9Db57eNUJdjzLCJNIW3lCRw05JP2TQ43PqKO6CiI=";
};
vendorSha256 = "sha256-ksN/1boBQVhevlDseVZsGUWL+Bwy4AMgGNdOPgsNNxk=";
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 ];
platforms = platforms.unix;
};
}