Merge branch 'master' into closure-size
This commit is contained in:
@@ -24,6 +24,12 @@ stdenv.mkDerivation rec {
|
||||
# Stripping destroys the generated SBCL image
|
||||
dontStrip = true;
|
||||
|
||||
configurePhase = ''
|
||||
substituteInPlace load.lisp --replace \
|
||||
";; (setf *contrib-dir* \"/usr/local/lib/clfswm/\")" \
|
||||
"(setf *contrib-dir* \"$out/lib/clfswm/\")"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/bin
|
||||
make DESTDIR=$out install
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{ stdenv, fetchFromGitHub, libX11, libXinerama, libXrandr, libXft, yacc, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cwm-5.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chneukirchen";
|
||||
repo = "cwm";
|
||||
rev = "b7a8c11750d11721a897fdb8442d52f15e7a24a0";
|
||||
sha256 = "0a0x8rgqif4kxy7hj70hck7jma6c8jy4428ybl8fz9qxgxh014ml";
|
||||
};
|
||||
|
||||
buildInputs = [ libX11 libXinerama libXrandr libXft yacc pkgconfig ];
|
||||
|
||||
prePatch = ''sed -i "s@/usr/local@$out@" Makefile'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A lightweight and efficient window manager for X11";
|
||||
homepage = https://github.com/chneukirchen/cwm;
|
||||
maintainers = [];
|
||||
license = licenses.isc;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
{ stdenv, fetchurl, pkgconfig
|
||||
{ gestures ? false
|
||||
, stdenv, fetchurl, pkgconfig
|
||||
, cairo, fontconfig, freetype, libXft, libXcursor, libXinerama
|
||||
, libXpm, librsvg, libpng, fribidi, perl
|
||||
, libstroke ? null
|
||||
}:
|
||||
|
||||
assert gestures -> libstroke != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fvwm-2.6.5";
|
||||
|
||||
@@ -15,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
pkgconfig cairo fontconfig freetype
|
||||
libXft libXcursor libXinerama libXpm
|
||||
librsvg libpng fribidi perl
|
||||
];
|
||||
] ++ stdenv.lib.optional gestures libstroke;
|
||||
|
||||
meta = {
|
||||
homepage = "http://fvwm.org";
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{ fetchurl, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "i3blocks-${version}";
|
||||
version = "1.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/vivien/i3blocks/releases/download/${version}/${name}.tar.gz";
|
||||
sha256 = "c64720057e22cc7cac5e8fcd58fd37e75be3a7d5a3cb8995841a7f18d30c0536";
|
||||
};
|
||||
|
||||
makeFlags = "all";
|
||||
installFlags = "PREFIX=\${out} VERSION=${version}";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A flexible scheduler for your i3bar blocks.";
|
||||
homepage = https://github.com/vivien/i3blocks;
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ "MindTooth" ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
From 00c5af939567429d40877845dc52b54fde2d8a50 Mon Sep 17 00:00:00 2001
|
||||
From: "Alexander V. Nikolaev" <avn@avnik.info>
|
||||
Date: Thu, 26 Nov 2015 10:53:12 +0200
|
||||
Subject: [PATCH 1/3] Substitution vars for absolute paths
|
||||
|
||||
---
|
||||
libqtile/pangocffi.py | 6 +++---
|
||||
libqtile/xcursors.py | 2 +-
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libqtile/pangocffi.py b/libqtile/pangocffi.py
|
||||
index 27691d1..25f690d 100644
|
||||
--- a/libqtile/pangocffi.py
|
||||
+++ b/libqtile/pangocffi.py
|
||||
@@ -58,9 +58,9 @@ except ImportError:
|
||||
else:
|
||||
raise ImportError("No module named libqtile._ffi_pango, be sure to run `python ./libqtile/ffi_build.py`")
|
||||
|
||||
-gobject = ffi.dlopen('libgobject-2.0.so.0')
|
||||
-pango = ffi.dlopen('libpango-1.0.so.0')
|
||||
-pangocairo = ffi.dlopen('libpangocairo-1.0.so.0')
|
||||
+gobject = ffi.dlopen('@glib@/lib/libgobject-2.0.so.0')
|
||||
+pango = ffi.dlopen('@pango@/lib/libpango-1.0.so.0')
|
||||
+pangocairo = ffi.dlopen('@pango@/lib/libpangocairo-1.0.so.0')
|
||||
|
||||
|
||||
def CairoContext(cairo_t):
|
||||
diff --git a/libqtile/xcursors.py b/libqtile/xcursors.py
|
||||
index e0e55e1..59b6428 100644
|
||||
--- a/libqtile/xcursors.py
|
||||
+++ b/libqtile/xcursors.py
|
||||
@@ -114,7 +114,7 @@ class Cursors(dict):
|
||||
|
||||
def _setup_xcursor_binding(self):
|
||||
try:
|
||||
- xcursor = ffi.dlopen('libxcb-cursor.so')
|
||||
+ xcursor = ffi.dlopen('@xcb-cursor@/lib/libxcb-cursor.so')
|
||||
except OSError:
|
||||
self.log.warning("xcb-cursor not found, fallback to font pointer")
|
||||
return False
|
||||
--
|
||||
2.6.3
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From f299a0aa0eefcf16bb4990f00ac3946727f43ef3 Mon Sep 17 00:00:00 2001
|
||||
From: "Alexander V. Nikolaev" <avn@avnik.info>
|
||||
Date: Fri, 27 Nov 2015 10:49:48 +0200
|
||||
Subject: [PATCH 2/3] Restore PATH and PYTHONPATH
|
||||
|
||||
---
|
||||
bin/qtile | 1 +
|
||||
bin/qtile-run | 1 +
|
||||
bin/qtile-session | 2 ++
|
||||
libqtile/utils.py | 7 +++++++
|
||||
4 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/bin/qtile b/bin/qtile
|
||||
index 66034fe..ce3fcd1 100755
|
||||
--- a/bin/qtile
|
||||
+++ b/bin/qtile
|
||||
@@ -131,6 +131,7 @@ def make_qtile():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
+ __import__("importlib").import_module("libqtile.utils").restore_os_environment()
|
||||
rename_process()
|
||||
q = make_qtile()
|
||||
try:
|
||||
diff --git a/bin/qtile-run b/bin/qtile-run
|
||||
index ccedb96..646a476 100755
|
||||
--- a/bin/qtile-run
|
||||
+++ b/bin/qtile-run
|
||||
@@ -50,6 +50,7 @@ def main():
|
||||
proc.wait()
|
||||
|
||||
if __name__ == "__main__":
|
||||
+ __import__("importlib").import_module("libqtile.utils").restore_os_environment()
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
diff --git a/bin/qtile-session b/bin/qtile-session
|
||||
index 84f6a2d..da31b12 100755
|
||||
--- a/bin/qtile-session
|
||||
+++ b/bin/qtile-session
|
||||
@@ -25,6 +25,8 @@
|
||||
Qtile session manager.
|
||||
"""
|
||||
|
||||
+__import__("importlib").import_module("libqtile.utils").restore_os_environment()
|
||||
+
|
||||
from libqtile.log_utils import init_log
|
||||
import logging
|
||||
import os
|
||||
diff --git a/libqtile/utils.py b/libqtile/utils.py
|
||||
index d5f975b..0fdb080 100644
|
||||
--- a/libqtile/utils.py
|
||||
+++ b/libqtile/utils.py
|
||||
@@ -208,3 +208,10 @@ def get_cache_dir():
|
||||
if not os.path.exists(cache_directory):
|
||||
os.makedirs(cache_directory)
|
||||
return cache_directory
|
||||
+
|
||||
+def restore_os_environment():
|
||||
+ pythonpath = os.environ.pop("QTILE_SAVED_PYTHONPATH", "")
|
||||
+ os.environ["PYTHONPATH"] = pythonpath
|
||||
+ path = os.environ.pop("QTILE_SAVED_PATH", None)
|
||||
+ if path:
|
||||
+ os.environ["PATH"] = path
|
||||
--
|
||||
2.6.3
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From b560c11078fecc35df2c62f34beda06c4e80a10d Mon Sep 17 00:00:00 2001
|
||||
From: "Alexander V. Nikolaev" <avn@avnik.info>
|
||||
Date: Fri, 27 Nov 2015 10:54:35 +0200
|
||||
Subject: [PATCH 3/3] Restart executable
|
||||
|
||||
---
|
||||
libqtile/manager.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libqtile/manager.py b/libqtile/manager.py
|
||||
index b1a38e2..110f7d8 100644
|
||||
--- a/libqtile/manager.py
|
||||
+++ b/libqtile/manager.py
|
||||
@@ -1339,7 +1339,7 @@ class Qtile(command.CommandObject):
|
||||
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(os.environ.get("QTILE_WRAPPER", "@out@/bin/qtile"), argv[1:])
|
||||
|
||||
def cmd_spawn(self, cmd):
|
||||
"""
|
||||
--
|
||||
2.6.3
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{ stdenv, lib, fetchFromGitHub, buildPythonPackage, python27Packages, pkgs }:
|
||||
|
||||
let cairocffi-xcffib = python27Packages.cairocffi.override {
|
||||
pythonPath = [ python27Packages.xcffib ];
|
||||
};
|
||||
in
|
||||
|
||||
buildPythonPackage rec {
|
||||
name = "qtile-${version}";
|
||||
version = "0.10.2";
|
||||
@@ -11,27 +16,28 @@ buildPythonPackage rec {
|
||||
sha256 = "0dhdwjr4pdlzli68fa8glrnsjzxp6agdab9cnmpsqlwiwh97x9a6";
|
||||
};
|
||||
|
||||
patches = [ ./restart_executable.patch ];
|
||||
patches = [
|
||||
./0001-Substitution-vars-for-absolute-paths.patch
|
||||
./0002-Restore-PATH-and-PYTHONPATH.patch
|
||||
./0003-Restart-executable.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace libqtile/manager.py --subst-var-by out $out
|
||||
substituteInPlace libqtile/pangocffi.py --subst-var-by glib ${pkgs.glib}
|
||||
substituteInPlace libqtile/pangocffi.py --subst-var-by pango ${pkgs.pango}
|
||||
substituteInPlace libqtile/xcursors.py --subst-var-by xcb-cursor ${pkgs.xorg.xcbutilcursor}
|
||||
'';
|
||||
|
||||
buildInputs = [ pkgs.pkgconfig pkgs.glib pkgs.xorg.libxcb pkgs.cairo pkgs.pango python27Packages.xcffib ];
|
||||
|
||||
cairocffi-xcffib = python27Packages.cairocffi.override {
|
||||
inherit LD_LIBRARY_PATH;
|
||||
pythonPath = [ python27Packages.xcffib ];
|
||||
};
|
||||
|
||||
pythonPath = with python27Packages; [ xcffib cairocffi-xcffib trollius readline ];
|
||||
|
||||
LD_LIBRARY_PATH = "${lib.makeLibraryPath [ pkgs.xorg.libxcb pkgs.cairo ]}";
|
||||
pythonPath = with python27Packages; [ xcffib cairocffi-xcffib trollius readline];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/qtile \
|
||||
--prefix LD_LIBRARY_PATH : \
|
||||
"${LD_LIBRARY_PATH}:${lib.makeLibraryPath [ pkgs.glib pkgs.pango ]}"
|
||||
--set QTILE_WRAPPER '"$0"' \
|
||||
--set QTILE_SAVED_PYTHONPATH '"$PYTHONPATH"' \
|
||||
--set QTILE_SAVED_PATH '"$PATH"'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
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):
|
||||
"""
|
||||
Reference in New Issue
Block a user