1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, python
5, pygobject3
6, xvfb-run
7, gobject-introspection
8, gtk3
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 version = "3.0.1";
14 pname = "liblarch";
15 disabled = pythonOlder "3.5.0";
16
17 src = fetchFromGitHub {
18 owner = "getting-things-gnome";
19 repo = "liblarch";
20 rev = "v${version}";
21 sha256 = "0xv2mfvyzipbny3iz8vll77wsqxfwh28xj6bj1ff0l452waph45m";
22 };
23
24 checkInputs = [
25 gobject-introspection # for setup hook
26 gtk3
27 ];
28
29 propagatedBuildInputs = [
30 pygobject3
31 ];
32
33 checkPhase = ''
34 runHook preCheck
35 ${xvfb-run}/bin/xvfb-run -s '-screen 0 800x600x24' \
36 ${python.interpreter} nix_run_setup test
37 runHook postCheck
38 '';
39
40 meta = with lib; {
41 description = "A python library built to easily handle data structure such are lists, trees and acyclic graphs";
42 homepage = "https://github.com/getting-things-gnome/liblarch";
43 downloadPage = "https://github.com/getting-things-gnome/liblarch/releases";
44 license = licenses.lgpl3Plus;
45 maintainers = with maintainers; [ oyren ];
46 platforms = platforms.linux;
47 };
48}