1{ lib
2, stdenv
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
15 src = fetchFromGitHub {
16 owner = "hercules-team";
17 repo = "python-augeas";
18 rev = "v${version}";
19 hash = "sha256-Lq8ckra3sqN38zo1d5JsEq6U5TtLKRmqysoWNwR9J9A=";
20 };
21
22 nativeBuildInputs = [ pkg-config ];
23
24 buildInputs = [ augeas pkgs.libxml2 ];
25
26 propagatedBuildInputs = [ cffi ];
27
28 nativeCheckInputs = [ unittestCheckHook ];
29
30 pythonImportsCheck = [ "augeas" ];
31
32 meta = with lib; {
33 changelog = "https://github.com/hercules-team/python-augeas/releases/tag/v${version}";
34 description = "Pure python bindings for augeas";
35 homepage = "https://github.com/hercules-team/python-augeas";
36 license = licenses.lgpl2Plus;
37 platforms = platforms.unix;
38 };
39}