gerd.lldap: added lldap-cli

This commit is contained in:
eyjhb 2024-09-01 20:07:20 +02:00
parent 29a638943f
commit 008c7ebfb9
No known key found for this signature in database
GPG key ID: 609F508E3239F920
2 changed files with 48 additions and 0 deletions

View file

@ -18,7 +18,13 @@ index 71e4928..63be13c 100644
let server_builder = infra::ldap_server::build_ldap_server(
&config,
'';
pkgLLDAPCli = pkgs.callPackage ./../../../shared/pkgs/lldap-cli.nix {};
in {
environment.systemPackages = [
pkgLLDAPCli
];
services.lldap = {
enable = true;

42
shared/pkgs/lldap-cli.nix Normal file
View file

@ -0,0 +1,42 @@
{
stdenv
, lib
, fetchFromGitHub
, makeWrapper
, bash
, gnugrep
, gnused
, jq
, curl
}:
stdenv.mkDerivation rec {
pname = "lldap-cli";
version = "unstable-2024-08-31";
src = fetchFromGitHub {
owner = "Zepmann";
repo = "lldap-cli";
rev = "6eb61cef179696633cafe080a018cd085d3c3f64";
sha256 = "sha256-Jchj4vqlGWmjFtdMwZAnI4VyBh+/p6rgZrpA77xlSb4=";
};
buildInputs = [
bash
gnugrep
gnused
jq
curl
];
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
mkdir -p $out/bin
cp lldap-cli $out/bin/lldap-cli
wrapProgram $out/bin/lldap-cli \
--prefix PATH : ${lib.makeBinPath buildInputs}
'';
}