1{
2 lib,
3 stdenv,
4 mkDerivationWith,
5 fetchFromGitHub,
6 python3Packages,
7 herbstluftwm,
8}:
9
10mkDerivationWith python3Packages.buildPythonApplication rec {
11 inherit stdenv;
12
13 pname = "webmacs";
14 version = "0.8";
15 format = "setuptools";
16
17 disabled = python3Packages.isPy27;
18
19 src = fetchFromGitHub {
20 owner = "parkouss";
21 repo = "webmacs";
22 rev = version;
23 fetchSubmodules = true;
24 sha256 = "1hzb9341hybgrqcy1w20hshm6xaiby4wbjpjkigf4zq389407368";
25 };
26
27 propagatedBuildInputs = with python3Packages; [
28 pyqtwebengine
29 setuptools
30 dateparser
31 jinja2
32 pygments
33 ];
34
35 nativeCheckInputs = [
36 python3Packages.pytest
37 #python3Packages.pytest-xvfb
38 #python3Packages.pytest-qt
39 python3Packages.pytestCheckHook
40 herbstluftwm
41
42 # The following are listed in test-requirements.txt but appear not
43 # to be needed at present:
44
45 # python3Packages.pytest-mock
46 # python3Packages.flake8
47 ];
48
49 # See https://github.com/parkouss/webmacs/blob/1a04fb7bd3f33d39cb4d71621b48c2458712ed39/setup.py#L32
50 # Don't know why they're using CC for g++.
51 preConfigure = ''
52 export CC=$CXX
53 '';
54
55 doCheck = false; # test dependencies not packaged up yet
56
57 dontWrapQtApps = true;
58
59 preFixup = ''
60 makeWrapperArgs+=("''${qtWrapperArgs[@]}")
61 '';
62
63 meta = with lib; {
64 description = "Keyboard-based web browser with Emacs/conkeror heritage";
65 mainProgram = "webmacs";
66 longDescription = ''
67 webmacs is yet another browser for keyboard-based web navigation.
68
69 It mainly targets emacs-like navigation, and started as a clone (in terms of
70 features) of conkeror.
71
72 Based on QtWebEngine and Python 3. Fully customizable in Python.
73 '';
74 homepage = "https://webmacs.readthedocs.io/en/latest/";
75 changelog = "https://github.com/parkouss/webmacs/blob/master/CHANGELOG.md";
76 license = licenses.gpl3;
77 maintainers = with maintainers; [ jacg ];
78 platforms = platforms.all;
79 };
80
81}