summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@users.noreply.github.com>2016-05-24 10:41:09 +0200
committerJoachim Fasting <joachifm@users.noreply.github.com>2016-05-24 10:41:09 +0200
commita21df566e4ccd5b9a1c243ba387055b5d50c4014 (patch)
tree842b4f2c55418133ef252049a9b228d4495eb68b /pkgs/tools/misc
parentddd95200118e4285851bfb34b6ba9ab1f1272cb4 (diff)
parent6b0bac3d7e43e3c1dccee6eac56f74e9bb1ea97d (diff)
downloadnixlib-a21df566e4ccd5b9a1c243ba387055b5d50c4014.tar
nixlib-a21df566e4ccd5b9a1c243ba387055b5d50c4014.tar.gz
nixlib-a21df566e4ccd5b9a1c243ba387055b5d50c4014.tar.bz2
nixlib-a21df566e4ccd5b9a1c243ba387055b5d50c4014.tar.lz
nixlib-a21df566e4ccd5b9a1c243ba387055b5d50c4014.tar.xz
nixlib-a21df566e4ccd5b9a1c243ba387055b5d50c4014.tar.zst
nixlib-a21df566e4ccd5b9a1c243ba387055b5d50c4014.zip
Merge pull request #15610 from sheenobu/xflux-gui
xflux-gui: init at 1.1.1
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/xflux/gui.nix47
-rw-r--r--pkgs/tools/misc/xflux/setup.patch28
2 files changed, 75 insertions, 0 deletions
diff --git a/pkgs/tools/misc/xflux/gui.nix b/pkgs/tools/misc/xflux/gui.nix
new file mode 100644
index 000000000000..b78eb910f938
--- /dev/null
+++ b/pkgs/tools/misc/xflux/gui.nix
@@ -0,0 +1,47 @@
+{ stdenv, pkgs, fetchFromGitHub, buildPythonPackage,
+  pexpect,
+  pyGtkGlade,
+  pygobject,
+  pyxdg,
+  gnome_python,
+}:
+buildPythonPackage rec {
+  version = "1.1.1";
+  name = "xflux-gui-${version}";
+
+  src = fetchFromGitHub {
+    repo = "xflux-gui";
+    owner = "xflux-gui";
+    rev = "d897dfd";
+    sha256 = "1mx1r2hz3g3waafn4w8hql0gaasfizbzz60bk5llw007k4k8892r";
+  };
+
+  # remove messing with shipped binary
+  patches = [ ./setup.patch ];
+
+  # not sure if these need to be propogated or not?
+  propagatedBuildInputs = [
+    pexpect
+    pyGtkGlade
+    pygobject
+    pyxdg
+    pkgs.libappindicator-gtk2
+    gnome_python
+  ];
+
+  buildInputs = [
+    pkgs.xflux
+  ];
+
+  postPatch = ''
+     substituteInPlace src/fluxgui/xfluxcontroller.py --replace "pexpect.spawn(\"xflux\"" "pexpect.spawn(\"${pkgs.xflux}/bin/xflux\""
+  '';
+
+  meta = {
+    description = "Better lighting for Linux. Open source GUI for xflux";
+    homepage = https://justgetflux.com/linux.html;
+    license = stdenv.lib.licenses.unfree; # marked as unfree since the source code contains a copy of the unfree xflux binary
+    maintainers = [ stdenv.lib.maintainers.sheenobu ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/tools/misc/xflux/setup.patch b/pkgs/tools/misc/xflux/setup.patch
new file mode 100644
index 000000000000..c36f81f7d808
--- /dev/null
+++ b/pkgs/tools/misc/xflux/setup.patch
@@ -0,0 +1,28 @@
+diff --git a/setup.py b/setup.py
+index e11f199..b1cb0e5 100644
+--- a/setup.py
++++ b/setup.py
+@@ -4,13 +4,6 @@ from distutils.core import setup
+ from sys import maxsize
+ from os import rename
+ 
+-# Determines which is the appropriate executable for 32-bit
+-if maxsize == 2147483647:
+-    rename("xflux32", "xflux")
+-# ... or 64-bit processors
+-elif maxsize == 9223372036854775807:
+-    rename("xflux64", "xflux")
+-
+ setup(name = "f.lux indicator applet",
+     version = "1.1.8",
+     description = "f.lux indicator applet - better lighting for your computer",
+@@ -22,8 +15,7 @@ setup(name = "f.lux indicator applet",
+     packages = ["fluxgui",],
+     package_data = {"fluxgui" : ["*.glade"] },
+     data_files=[('share/icons/hicolor/scalable/apps', ['fluxgui.svg', 'fluxgui-light.svg', 'fluxgui-dark.svg']),
+-            ('share/applications', ['desktop/fluxgui.desktop']),
+-            ('bin', ['xflux']),],
++            ('share/applications', ['desktop/fluxgui.desktop']),],
+     scripts = ["fluxgui"],
+     long_description = """f.lux indicator applet is an indicator applet to
+     control xflux, an application that makes the color of your computer's