2023-09-12 17:10:41 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, oath-toolkit
|
|
|
|
, openldap
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "glauth";
|
2024-02-19 07:31:38 +00:00
|
|
|
version = "2.3.2";
|
2023-09-12 17:10:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "glauth";
|
|
|
|
repo = "glauth";
|
|
|
|
rev = "v${version}";
|
2024-02-19 07:31:38 +00:00
|
|
|
hash = "sha256-FOhtL8nIm5kuKRxFtkrDyUU2z1K22ZdHaes3GY0KmfQ=";
|
2023-09-12 17:10:41 +00:00
|
|
|
};
|
|
|
|
|
2024-02-12 03:51:37 +00:00
|
|
|
vendorHash = "sha256-MfauZRufl3kxr1fqatxTmiIvLJ+5JhbpSnbTHiujME8=";
|
2023-09-12 17:10:41 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
oath-toolkit
|
|
|
|
openldap
|
|
|
|
];
|
|
|
|
|
|
|
|
modRoot = "v2";
|
|
|
|
|
|
|
|
# Disable go workspaces to fix build.
|
|
|
|
env.GOWORK = "off";
|
|
|
|
|
|
|
|
# Based on ldflags in <glauth>/Makefile.
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.GitClean=1"
|
|
|
|
"-X main.LastGitTag=v${version}"
|
|
|
|
"-X main.GitTagIsCommit=1"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests fail in the sandbox.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-07 07:46:46 +00:00
|
|
|
description = "Lightweight LDAP server for development, home use, or CI";
|
2023-09-12 17:10:41 +00:00
|
|
|
homepage = "https://github.com/glauth/glauth";
|
|
|
|
license = licenses.mit;
|
2024-01-19 09:06:32 +00:00
|
|
|
maintainers = with maintainers; [ bjornfor christoph-heiss ];
|
2023-09-12 17:10:41 +00:00
|
|
|
mainProgram = "glauth";
|
|
|
|
};
|
|
|
|
}
|