mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
be41239394
As of v2.3.1, vendoring of the toml module was dropped by upstream, so we can remove it here too. See also #288194. Signed-off-by: Christoph Heiss <christoph@c8h4.io>
50 lines
1,017 B
Nix
50 lines
1,017 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, oath-toolkit
|
|
, openldap
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "glauth";
|
|
version = "2.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "glauth";
|
|
repo = "glauth";
|
|
rev = "v${version}";
|
|
hash = "sha256-OkkiB1AGO7r7ehpnSJ+cB00crVpZ5Cwy4rAT55LUUdE=";
|
|
};
|
|
|
|
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 = "A 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";
|
|
};
|
|
}
|