2016-09-26 10:09:25 +01:00
|
|
|
{ stdenv, fetchFromGitHub, python27Packages, glib, cairo, pango, pkgconfig, libxcb, xcbutilcursor }:
|
2015-07-28 21:52:03 +01:00
|
|
|
|
2015-12-01 11:46:18 +00:00
|
|
|
let cairocffi-xcffib = python27Packages.cairocffi.override {
|
2018-02-21 02:25:23 +00:00
|
|
|
withXcffib = true;
|
2015-12-01 11:46:18 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2016-09-26 10:09:25 +01:00
|
|
|
python27Packages.buildPythonApplication rec {
|
2015-07-28 21:52:03 +01:00
|
|
|
name = "qtile-${version}";
|
2018-08-08 23:05:03 +01:00
|
|
|
version = "0.12.0";
|
2015-07-28 21:52:03 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qtile";
|
|
|
|
repo = "qtile";
|
|
|
|
rev = "v${version}";
|
2018-08-08 23:05:03 +01:00
|
|
|
sha256 = "0ynmmnh12mr3gwgz0j7l2hvm8c0y5gzsw80jszdkp4s5bh1q0nrj";
|
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
|
2016-09-26 10:09:25 +01:00
|
|
|
substituteInPlace libqtile/pangocffi.py --subst-var-by glib ${glib.out}
|
|
|
|
substituteInPlace libqtile/pangocffi.py --subst-var-by pango ${pango.out}
|
|
|
|
substituteInPlace libqtile/xcursors.py --subst-var-by xcb-cursor ${xcbutilcursor.out}
|
2015-07-28 21:52:03 +01:00
|
|
|
'';
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ glib libxcb cairo pango python27Packages.xcffib ];
|
2015-07-28 21:52:03 +01:00
|
|
|
|
2016-10-13 23:03:12 +01:00
|
|
|
pythonPath = with python27Packages; [ xcffib cairocffi-xcffib trollius ];
|
2015-07-28 21:52:03 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/qtile \
|
2017-11-19 23:56:03 +00:00
|
|
|
--run 'export QTILE_WRAPPER=$0' \
|
|
|
|
--run 'export QTILE_SAVED_PYTHONPATH=$PYTHONPATH' \
|
|
|
|
--run 'export QTILE_SAVED_PATH=$PATH'
|
2015-07-28 21:52:03 +01:00
|
|
|
'';
|
|
|
|
|
2017-12-11 11:14:54 +00:00
|
|
|
doCheck = false; # Requires X server.
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|