about summary refs log tree commit diff
path: root/pkgs/tools/X11/xborders/default.nix
blob: 379f976acf4515791d11a4263557324c4625e7f0 (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
{ lib
, python3Packages
, fetchFromGitHub
, libwnck
, gtk3
, libnotify
, wrapGAppsHook
, gobject-introspection
, substituteAll
}:

python3Packages.buildPythonPackage rec {
  pname = "xborders";
  version = "3.4"; # in version.txt

  src = fetchFromGitHub {
    owner = "deter0";
    repo = "xborder";
    rev = "e74ae532b9555c59d195537934fa355b3fea73c5";
    hash = "sha256-UKsseNkXest6npPqJKvKL0iBWeK+S7zynrDlyXIOmF4=";
  };

  buildInputs = [
    libwnck
    gtk3
    libnotify
  ];

  nativeBuildInputs = [
    wrapGAppsHook
    gobject-introspection
  ];

  propagatedBuildInputs = with python3Packages; [
    pycairo
    requests
    pygobject3
  ];

  postPatch = let
    setup = substituteAll {
      src = ./setup.py;
      desc = meta.description; # "description" is reserved
      inherit pname version;
    };
  in ''
    ln -s ${setup} setup.py
  '';

  meta = with lib; {
    description = "Active window border replacement for window managers";
    homepage = "https://github.com/deter0/xborder";
    license = licenses.unlicense;
    maintainers = with maintainers; [ elnudev ];
    platforms = platforms.linux;
    mainProgram = "xborders";
  };
}