base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / gl / glauth / package.nix
blob00a4bbee1f1e15cf20e9de9f90dae3e09859feaa
1 { lib
2 , fetchFromGitHub
3 , buildGoModule
4 , oath-toolkit
5 , openldap
6 }:
8 buildGoModule rec {
9   pname = "glauth";
10   version = "2.3.2";
12   src = fetchFromGitHub {
13     owner = "glauth";
14     repo = "glauth";
15     rev = "v${version}";
16     hash = "sha256-FOhtL8nIm5kuKRxFtkrDyUU2z1K22ZdHaes3GY0KmfQ=";
17   };
19   vendorHash = "sha256-MfauZRufl3kxr1fqatxTmiIvLJ+5JhbpSnbTHiujME8=";
21   nativeCheckInputs = [
22     oath-toolkit
23     openldap
24   ];
26   modRoot = "v2";
28   # Disable go workspaces to fix build.
29   env.GOWORK = "off";
31   # Based on ldflags in <glauth>/Makefile.
32   ldflags = [
33     "-s"
34     "-w"
35     "-X main.GitClean=1"
36     "-X main.LastGitTag=v${version}"
37     "-X main.GitTagIsCommit=1"
38   ];
40   # Tests fail in the sandbox.
41   doCheck = false;
43   meta = with lib; {
44     description = "Lightweight LDAP server for development, home use, or CI";
45     homepage = "https://github.com/glauth/glauth";
46     license = licenses.mit;
47     maintainers = with maintainers; [ bjornfor christoph-heiss ];
48     mainProgram = "glauth";
49   };