1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 unittestCheckHook,
6 pkg-config,
7 augeas,
8 cffi,
9 pkgs, # for libxml2
10}:
11buildPythonPackage rec {
12 pname = "augeas";
13 version = "1.2.0";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "hercules-team";
18 repo = "python-augeas";
19 rev = "v${version}";
20 hash = "sha256-Lq8ckra3sqN38zo1d5JsEq6U5TtLKRmqysoWNwR9J9A=";
21 };
22
23 nativeBuildInputs = [ pkg-config ];
24
25 buildInputs = [
26 augeas
27 pkgs.libxml2
28 ];
29
30 propagatedBuildInputs = [ cffi ];
31
32 nativeCheckInputs = [ unittestCheckHook ];
33
34 pythonImportsCheck = [ "augeas" ];
35
36 meta = with lib; {
37 changelog = "https://github.com/hercules-team/python-augeas/releases/tag/v${version}";
38 description = "Pure python bindings for augeas";
39 homepage = "https://github.com/hercules-team/python-augeas";
40 license = licenses.lgpl2Plus;
41 platforms = platforms.unix;
42 };
43}