about summary refs log tree commit diff
path: root/pkgs/applications/misc/dockbarx/default.nix
blob: 3b147bdcc36043e7bbfcdba1399a8483d1d3ef23 (plain) (blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{ lib
, fetchFromGitHub
, glib
, gobject-introspection
, gtk3
, keybinder3
, libwnck
, python3Packages
, wrapGAppsHook
}:

python3Packages.buildPythonApplication rec {
  pname = "dockbarx";
  version = "1.0-beta2";

  src = fetchFromGitHub {
    owner = "xuzhen";
    repo = "dockbarx";
    rev = version;
    sha256 = "sha256-WMRTtprDHUbOOYVHshx7WpBlYshbiDjI12Rw3tQQuPI=";
  };

  nativeBuildInputs = [
    glib.dev
    gobject-introspection
    python3Packages.polib
    wrapGAppsHook
  ];

  buildInputs = [
    gtk3
    libwnck
    keybinder3
  ];

  propagatedBuildInputs = with python3Packages; [
    dbus-python
    pillow
    pygobject3
    pyxdg
    xlib
  ];

  # no tests
  doCheck = false;

  dontWrapGApps = true;

  postPatch = ''
    substituteInPlace setup.py \
      --replace /usr/ "" \
      --replace '"/", "usr", "share",' '"share",'

    for f in \
      dbx_preference \
      dockbarx/applets.py \
      dockbarx/dockbar.py \
      dockbarx/iconfactory.py \
      dockbarx/theme.py \
      mate_panel_applet/dockbarx_mate_applet
    do
      substituteInPlace $f --replace /usr/share/ $out/share/
    done
  '';

  postInstall = ''
    glib-compile-schemas $out/share/glib-2.0/schemas
  '';

  # Arguments to be passed to `makeWrapper`, only used by buildPython*
  preFixup = ''
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  meta = with lib; {
    homepage = "https://github.com/xuzhen/dockbarx";
    description = "Lightweight taskbar/panel replacement which works as a stand-alone dock";
    license = licenses.gpl3Only;
    platforms = platforms.linux;
    maintainers = [ maintainers.romildo ];
  };
}