diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 313bd8f9bb4c..7aca12522d1e 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -130,6 +130,7 @@ jwiegley = "John Wiegley "; jwilberding = "Jordan Wilberding "; jzellner = "Jeff Zellner "; + kamilchm = "Kamil Chmielewski "; kkallio = "Karn Kallio "; koral = "Koral "; kovirobi = "Kovacsics Robert "; diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix new file mode 100644 index 000000000000..39d942362be1 --- /dev/null +++ b/pkgs/applications/window-managers/qtile/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub, buildPythonPackage, python27Packages, pkgs }: + +buildPythonPackage rec { + name = "qtile-${version}"; + version = "0.10.1"; + + src = fetchFromGitHub { + owner = "qtile"; + repo = "qtile"; + rev = "v${version}"; + sha256 = "1g02lvk2cqy6w6y6nw6dnsmy4i9k4fyawyibpkf0a7a1nfrd6a99"; + }; + + patches = [ ./restart_executable.patch ]; + + postPatch = '' + substituteInPlace libqtile/manager.py --subst-var-by out $out + ''; + + buildInputs = [ pkgs.pkgconfig pkgs.glib pkgs.xlibs.libxcb pkgs.cairo pkgs.pango python27Packages.xcffib ]; + + cairocffi-xcffib = python27Packages.cairocffi.override { + LD_LIBRARY_PATH = "${pkgs.xlibs.libxcb}/lib:${pkgs.cairo}/lib"; + pythonPath = [ python27Packages.xcffib ]; + }; + + pythonPath = with python27Packages; [ xcffib cairocffi-xcffib trollius readline ]; + + LD_LIBRARY_PATH = "${pkgs.xlibs.libxcb}/lib:${pkgs.cairo}/lib"; + + postInstall = '' + wrapProgram $out/bin/qtile \ + --prefix LD_LIBRARY_PATH : ${pkgs.xlibs.libxcb}/lib \ + --prefix LD_LIBRARY_PATH : ${pkgs.glib}/lib \ + --prefix LD_LIBRARY_PATH : ${pkgs.cairo}/lib \ + --prefix LD_LIBRARY_PATH : ${pkgs.pango}/lib + ''; + + 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 ]; + }; +} + diff --git a/pkgs/applications/window-managers/qtile/restart_executable.patch b/pkgs/applications/window-managers/qtile/restart_executable.patch new file mode 100644 index 000000000000..a1e74a575d9e --- /dev/null +++ b/pkgs/applications/window-managers/qtile/restart_executable.patch @@ -0,0 +1,12 @@ +diff -ruP a/libqtile/manager.py b/libqtile/manager.py +--- a/libqtile/manager.py 2015-07-26 21:26:16.947976520 +0200 ++++ b/libqtile/manager.py 2015-07-26 21:37:45.581316712 +0200 +@@ -1262,7 +1262,7 @@ + argv = [s for s in argv if not s.startswith('--with-state')] + argv.append('--with-state=' + buf.getvalue().decode()) + +- self.cmd_execute(sys.executable, argv) ++ self.cmd_execute("@out@/bin/qtile", argv[1:]) + + def cmd_spawn(self, cmd): + """ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 54cedb67699d..841dbe178721 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12986,6 +12986,8 @@ let qpdfview = callPackage ../applications/misc/qpdfview {}; + qtile = callPackage ../applications/window-managers/qtile { }; + qvim = lowPrio (callPackage ../applications/editors/vim/qvim.nix { inherit (pkgs) fetchgit stdenv ncurses pkgconfig gettext composableDerivation lib config python perl tcl ruby qt4; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 25e6a22aa613..0bf0979ac6a7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1681,11 +1681,11 @@ let cairocffi = buildPythonPackage rec { - name = "cairocffi-0.5.4"; + name = "cairocffi-0.7.1"; src = pkgs.fetchurl { url = "https://pypi.python.org/packages/source/c/cairocffi/${name}.tar.gz"; - md5 = "e3fa4002583bfaa88b156e1af9c75bde"; + md5 = "e26d06a8d8b16c7210414ce15d453636"; }; propagatedBuildInputs = with self; [ cffi ]; @@ -2363,11 +2363,11 @@ let }; cffi = buildPythonPackage rec { - name = "cffi-0.8.6"; + name = "cffi-1.1.2"; src = pkgs.fetchurl { - url = "http://pypi.python.org/packages/source/c/cffi/${name}.tar.gz"; - sha256 = "0406j3sgndmx88idv5zxkkrwfqxmjl18pj8gf47nsg4ymzixjci5"; + url = "https://pypi.python.org/packages/source/c/cffi/${name}.tar.gz"; + md5 = "ca6e6c45b45caa87aee9adc7c796eaea"; }; propagatedBuildInputs = with self; [ pkgs.libffi pycparser ]; @@ -16770,4 +16770,22 @@ let }; }; + xcffib = buildPythonPackage rec { + version = "0.3.2"; + name = "xcffib-${version}"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/x/xcffib/${name}.tar.gz"; + md5 = "fa13f3fee67c83016a1242982a7c8bda"; + }; + + propagatedBuildInputs = [ self.cffi self.six ]; + + meta = { + description = "A drop in replacement for xpyb, an XCB python binding"; + homepage = "https://github.com/tych0/xcffib"; + license = licenses.asl20; + maintainers = with maintainers; [ kamilchm ]; + }; + }; }; in pythonPackages