nixpkgs/pkgs/applications/window-managers/qtile/default.nix

52 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, python27Packages, glib, cairo, pango, pkgconfig, libxcb, xcbutilcursor }:
2015-07-28 21:52:03 +01:00
let cairocffi-xcffib = python27Packages.cairocffi.override {
pythonPath = [ python27Packages.xcffib ];
};
in
python27Packages.buildPythonApplication rec {
2015-07-28 21:52:03 +01:00
name = "qtile-${version}";
2016-02-15 12:15:48 +00:00
version = "0.10.4";
2015-07-28 21:52:03 +01:00
src = fetchFromGitHub {
owner = "qtile";
repo = "qtile";
rev = "v${version}";
2016-02-15 12:15:48 +00:00
sha256 = "0rwklzgkp3x242xql6qmfpfnhr788hd3jc1l80pc5ybxlwyfx59i";
2015-07-28 21:52:03 +01: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
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
'';
buildInputs = [ pkgconfig 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 \
--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 ];
};
}