2015-07-28 21:52:03 +01:00
|
|
|
{ stdenv, fetchFromGitHub, buildPythonPackage, python27Packages, pkgs }:
|
|
|
|
|
2015-12-01 11:46:18 +00:00
|
|
|
let cairocffi-xcffib = python27Packages.cairocffi.override {
|
|
|
|
pythonPath = [ python27Packages.xcffib ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2015-07-28 21:52:03 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
name = "qtile-${version}";
|
2015-12-28 10:00:18 +00:00
|
|
|
version = "0.10.3";
|
2015-07-28 21:52:03 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qtile";
|
|
|
|
repo = "qtile";
|
|
|
|
rev = "v${version}";
|
2015-12-28 10:00:18 +00:00
|
|
|
sha256 = "02252sfcniijkpk5rfgb800wvdpl223xrx1bhrxpzgggpgfbnmn6";
|
2015-07-28 21:52:03 +01:00
|
|
|
};
|
|
|
|
|
2015-12-01 11:46:18 +00:00
|
|
|
patches = [
|
|
|
|
./0001-Substitution-vars-for-absolute-paths.patch
|
|
|
|
./0002-Restore-PATH-and-PYTHONPATH.patch
|
|
|
|
./0003-Restart-executable.patch
|
|
|
|
];
|
2015-07-28 21:52:03 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace libqtile/manager.py --subst-var-by out $out
|
2015-12-01 11:46:18 +00:00
|
|
|
substituteInPlace libqtile/pangocffi.py --subst-var-by glib ${pkgs.glib}
|
|
|
|
substituteInPlace libqtile/pangocffi.py --subst-var-by pango ${pkgs.pango}
|
|
|
|
substituteInPlace libqtile/xcursors.py --subst-var-by xcb-cursor ${pkgs.xorg.xcbutilcursor}
|
2015-07-28 21:52:03 +01:00
|
|
|
'';
|
|
|
|
|
2015-09-15 10:26:18 +01:00
|
|
|
buildInputs = [ pkgs.pkgconfig pkgs.glib pkgs.xorg.libxcb pkgs.cairo pkgs.pango python27Packages.xcffib ];
|
2015-07-28 21:52:03 +01:00
|
|
|
|
2015-12-01 11:46:18 +00:00
|
|
|
pythonPath = with python27Packages; [ xcffib cairocffi-xcffib trollius readline];
|
2015-07-28 21:52:03 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/qtile \
|
2015-12-01 11:46:18 +00:00
|
|
|
--set QTILE_WRAPPER '"$0"' \
|
|
|
|
--set QTILE_SAVED_PYTHONPATH '"$PYTHONPATH"' \
|
|
|
|
--set QTILE_SAVED_PATH '"$PATH"'
|
2015-07-28 21:52:03 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.qtile.org/;
|
|
|
|
license = licenses.mit;
|
|
|
|
description = "A small, flexible, scriptable tiling window manager written in Python";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ kamilchm ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|