mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
51 lines
1015 B
Nix
51 lines
1015 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, oath-toolkit
|
|
, openldap
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "glauth";
|
|
version = "2.3.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "glauth";
|
|
repo = "glauth";
|
|
rev = "v${version}";
|
|
hash = "sha256-FOhtL8nIm5kuKRxFtkrDyUU2z1K22ZdHaes3GY0KmfQ=";
|
|
};
|
|
|
|
vendorHash = "sha256-MfauZRufl3kxr1fqatxTmiIvLJ+5JhbpSnbTHiujME8=";
|
|
|
|
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; {
|
|
description = "Lightweight LDAP server for development, home use, or CI";
|
|
homepage = "https://github.com/glauth/glauth";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ bjornfor christoph-heiss ];
|
|
mainProgram = "glauth";
|
|
};
|
|
}
|