summary refs log tree commit diff
path: root/pkgs/desktops/xfce/panel-plugins/xfce4-dockbarx-plugin.nix
blob: 621b4266d10cfabf52ef960f7e87d7bdd71b08e8 (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
{ stdenv, pkgconfig, fetchFromGitHub, python2, bash, vala, dockbarx, gtk2, xfce, pythonPackages }:

stdenv.mkDerivation rec {
  ver = "0.5";
  rev = "a2dcb66";
  name = "xfce4-dockbarx-plugin-${ver}-${rev}";

  src = fetchFromGitHub {
    owner = "TiZ-EX1";
    repo = "xfce4-dockbarx-plugin";
    rev = rev;
    sha256 = "1f75iwlshnif60x0qqdqw5ffng2m4f4zp0ijkrbjz83wm73nsxfx";
  };

  pythonPath = [ dockbarx ];

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ python2 vala gtk2 pythonPackages.wrapPython ]
    ++ (with xfce; [ libxfce4util xfce4-panel xfconf xfce4-dev-tools ])
    ++ pythonPath;

  postPatch = ''
    substituteInPlace wscript           --replace /usr/share/            "\''${PREFIX}/share/"
    substituteInPlace src/dockbarx.vala --replace /usr/share/            $out/share/
    substituteInPlace src/dockbarx.vala --replace '/usr/bin/env python2' ${bash}/bin/bash
  '';

  configurePhase = "python waf configure --prefix=$out";

  buildPhase = "python waf build";

  installPhase = "python waf install";

  postFixup = ''
    wrapPythonProgramsIn "$out/share/xfce4/panel/plugins" "$out $pythonPath"
  '';

  meta = with stdenv.lib; {
    homepage = https://github.com/TiZ-EX1/xfce4-dockbarx-plugin;
    description = "A plugins to embed DockbarX into xfce4-panel";
    license = licenses.mit;
    platforms = platforms.linux;
    maintainers = [ maintainers.volth ];
  };
}