2019-01-07 08:09:21 -08:00
|
|
|
{ stdenv, fetchFromGitHub, python37Packages, glib, cairo, pango, pkgconfig, libxcb, xcbutilcursor }:
|
2015-07-28 13:52:03 -07:00
|
|
|
|
2019-01-07 08:09:21 -08:00
|
|
|
let cairocffi-xcffib = python37Packages.cairocffi.override {
|
2018-02-20 18:25:23 -08:00
|
|
|
withXcffib = true;
|
2015-12-01 03:46:18 -08:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2019-01-07 08:09:21 -08:00
|
|
|
python37Packages.buildPythonApplication rec {
|
2015-07-28 13:52:03 -07:00
|
|
|
name = "qtile-${version}";
|
2019-01-07 08:09:21 -08:00
|
|
|
version = "0.13.0";
|
2015-07-28 13:52:03 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qtile";
|
|
|
|
repo = "qtile";
|
|
|
|
rev = "v${version}";
|
2019-01-07 08:09:21 -08:00
|
|
|
sha256 = "1lyclnn8hs6wl4w9v5b4hh2q0pvmsn7cyibpskhbpw0cgv7bvi90";
|
2015-07-28 13:52:03 -07:00
|
|
|
};
|
|
|
|
|
2015-12-01 03:46:18 -08:00
|
|
|
patches = [
|
|
|
|
./0001-Substitution-vars-for-absolute-paths.patch
|
|
|
|
./0002-Restore-PATH-and-PYTHONPATH.patch
|
|
|
|
./0003-Restart-executable.patch
|
|
|
|
];
|
2015-07-28 13:52:03 -07:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace libqtile/manager.py --subst-var-by out $out
|
2016-09-26 02:09:25 -07: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 13:52:03 -07:00
|
|
|
'';
|
|
|
|
|
2017-09-05 14:26:13 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2019-01-07 08:09:21 -08:00
|
|
|
buildInputs = [ glib libxcb cairo pango python37Packages.xcffib ];
|
2015-07-28 13:52:03 -07:00
|
|
|
|
2019-09-27 03:23:43 -07:00
|
|
|
pythonPath = with python37Packages; [ xcffib cairocffi-xcffib setuptools ];
|
2015-07-28 13:52:03 -07:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/qtile \
|
2017-11-19 15:56:03 -08:00
|
|
|
--run 'export QTILE_WRAPPER=$0' \
|
|
|
|
--run 'export QTILE_SAVED_PYTHONPATH=$PYTHONPATH' \
|
|
|
|
--run 'export QTILE_SAVED_PATH=$PATH'
|
2015-07-28 13:52:03 -07:00
|
|
|
'';
|
|
|
|
|
2017-12-11 03:14:54 -08:00
|
|
|
doCheck = false; # Requires X server.
|
|
|
|
|
2015-07-28 13:52:03 -07:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://www.qtile.org/";
|
2015-07-28 13:52:03 -07:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "A small, flexible, scriptable tiling window manager written in Python";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ kamilchm ];
|
|
|
|
};
|
|
|
|
}
|