Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 fetchFromGitHub,
4 buildGoModule,
5 oath-toolkit,
6 openldap,
7}:
8
9buildGoModule rec {
10 pname = "glauth";
11 version = "2.3.2";
12
13 src = fetchFromGitHub {
14 owner = "glauth";
15 repo = "glauth";
16 rev = "v${version}";
17 hash = "sha256-FOhtL8nIm5kuKRxFtkrDyUU2z1K22ZdHaes3GY0KmfQ=";
18 };
19
20 vendorHash = "sha256-MfauZRufl3kxr1fqatxTmiIvLJ+5JhbpSnbTHiujME8=";
21
22 nativeCheckInputs = [
23 oath-toolkit
24 openldap
25 ];
26
27 modRoot = "v2";
28
29 # Disable go workspaces to fix build.
30 env.GOWORK = "off";
31
32 # Based on ldflags in <glauth>/Makefile.
33 ldflags = [
34 "-s"
35 "-w"
36 "-X main.GitClean=1"
37 "-X main.LastGitTag=v${version}"
38 "-X main.GitTagIsCommit=1"
39 ];
40
41 # Tests fail in the sandbox.
42 doCheck = false;
43
44 meta = with lib; {
45 description = "Lightweight LDAP server for development, home use, or CI";
46 homepage = "https://github.com/glauth/glauth";
47 license = licenses.mit;
48 maintainers = with maintainers; [
49 bjornfor
50 christoph-heiss
51 ];
52 mainProgram = "glauth";
53 };
54}