Merge pull request #15610 from sheenobu/xflux-gui
xflux-gui: init at 1.1.1
This commit is contained in:
commit
a21df566e4
3 changed files with 82 additions and 0 deletions
47
pkgs/tools/misc/xflux/gui.nix
Normal file
47
pkgs/tools/misc/xflux/gui.nix
Normal file
|
@ -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;
|
||||
};
|
||||
}
|
28
pkgs/tools/misc/xflux/setup.patch
Normal file
28
pkgs/tools/misc/xflux/setup.patch
Normal file
|
@ -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
|
|
@ -3923,6 +3923,13 @@ in
|
|||
xe-guest-utilities = callPackage ../tools/virtualization/xe-guest-utilities { };
|
||||
|
||||
xflux = callPackage ../tools/misc/xflux { };
|
||||
xflux-gui = callPackage ../tools/misc/xflux/gui.nix {
|
||||
pexpect = pythonPackages.pexpect;
|
||||
pyGtkGlade = pythonPackages.pyGtkGlade;
|
||||
pygobject = pythonPackages.pygobject;
|
||||
pyxdg = pythonPackages.pyxdg;
|
||||
gnome_python = gnome.gnome_python;
|
||||
};
|
||||
|
||||
xfsprogs = callPackage ../tools/filesystems/xfsprogs { };
|
||||
libxfs = self.xfsprogs.dev; # outputs TODO
|
||||
|
|
Loading…
Reference in a new issue