2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python37Packages, glib, cairo, pango, pkgconfig, libxcb, xcbutilcursor }:
|
2015-07-28 21:52:03 +01:00
|
|
|
|
2019-01-07 16:09:21 +00:00
|
|
|
let cairocffi-xcffib = python37Packages.cairocffi.override {
|
2018-02-21 02:25:23 +00:00
|
|
|
withXcffib = true;
|
2015-12-01 11:46:18 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2019-01-07 16:09:21 +00:00
|
|
|
python37Packages.buildPythonApplication rec {
|
2015-07-28 21:52:03 +01:00
|
|
|
name = "qtile-${version}";
|
2020-07-25 16:51:57 +01:00
|
|
|
version = "0.16.0";
|
2015-07-28 21:52:03 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qtile";
|
|
|
|
repo = "qtile";
|
|
|
|
rev = "v${version}";
|
2020-07-25 16:51:57 +01:00
|
|
|
sha256 = "1klv1k9847nyx71sfrhqyl1k51k2w8phqnp2bns4dvbqii7q125l";
|
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 = ''
|
2020-07-25 16:51:57 +01:00
|
|
|
substituteInPlace libqtile/core/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}
|
2020-07-25 16:51:57 +01:00
|
|
|
substituteInPlace libqtile/backend/x11/xcursors.py --subst-var-by xcb-cursor ${xcbutilcursor.out}
|
2015-07-28 21:52:03 +01:00
|
|
|
'';
|
|
|
|
|
2020-07-25 16:51:57 +01:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2019-01-07 16:09:21 +00:00
|
|
|
buildInputs = [ glib libxcb cairo pango python37Packages.xcffib ];
|
2015-07-28 21:52:03 +01:00
|
|
|
|
2020-10-04 09:46:12 +01:00
|
|
|
pythonPath = with python37Packages; [
|
|
|
|
xcffib
|
|
|
|
cairocffi-xcffib
|
|
|
|
setuptools
|
|
|
|
setuptools_scm
|
|
|
|
dateutil
|
|
|
|
dbus-python
|
|
|
|
mpd2
|
|
|
|
psutil
|
|
|
|
pyxdg
|
|
|
|
pygobject3
|
2020-10-04 11:08:26 +01:00
|
|
|
];
|
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
|
|
|
'';
|
|
|
|
|
2020-07-25 16:51:57 +01:00
|
|
|
doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure.
|
2017-12-11 11:14:54 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.qtile.org/";
|
2015-07-28 21:52:03 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "A small, flexible, scriptable tiling window manager written in Python";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ kamilchm ];
|
|
|
|
};
|
|
|
|
}
|