![Profpatsch](/assets/img/avatar_default.png)
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl
|
|
, pkgconfig, makeWrapper, autoreconfHook
|
|
, openldap, python, pam
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nss-pam-ldapd";
|
|
version = "0.9.11";
|
|
|
|
src = fetchurl {
|
|
url = "https://arthurdejong.org/nss-pam-ldapd/${pname}-${version}.tar.gz";
|
|
sha256 = "1dna3r0q6sjhhlkhcp8x2zkslrd4y7701kk6fl5r940sdph1pmyh";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper autoreconfHook ];
|
|
buildInputs = [ openldap pam python ];
|
|
|
|
preConfigure = ''
|
|
substituteInPlace Makefile.in --replace "install-data-local: " "# install-data-local: "
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--with-bindpw-file=/run/nslcd/bindpw"
|
|
"--with-nslcd-socket=/run/nslcd/socket"
|
|
"--with-nslcd-pidfile=/run/nslcd/nslcd.pid"
|
|
"--with-pam-seclib-dir=$(out)/lib/security"
|
|
"--enable-kerberos=no"
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/sbin/nslcd --prefix LD_LIBRARY_PATH ":" $out/lib
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "LDAP identity and authentication for NSS/PAM";
|
|
homepage = "https://arthurdejong.org/nss-pam-ldapd/";
|
|
license = licenses.lgpl21;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|