blob: 50d4091f6f753b507a622eb9cd835de4102cc41f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
openldap,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "slapd";
version = "0.1.6";
pyproject = true;
# Pypi tarball doesn't include tests/
src = fetchFromGitHub {
owner = "python-ldap";
repo = "python-slapd";
tag = version;
hash = "sha256-xXIKC8xDJ3Q6yV1BL5Io0PkLqVbFRbbkB0QSXQGHMNg=";
};
build-system = [ hatchling ];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
# Needed by tests to setup a mockup ldap server
export BIN="${openldap}/bin"
export SBIN="${openldap}/bin"
export SLAPD="${openldap}/libexec/slapd"
export SCHEMA="${openldap}/etc/schema"
'';
pythonImportsCheck = [ "slapd" ];
meta = {
description = "Controls a slapd process in a pythonic way";
homepage = "https://github.com/python-ldap/python-slapd";
changelog = "https://github.com/python-ldap/python-slapd/blob/${src.tag}/CHANGES.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ erictapen ];
};
}
|