pywal: move to pythonPackages and inject path to convert
This commit is contained in:
parent
de0de8903f
commit
281981a6df
|
@ -0,0 +1,21 @@
|
||||||
|
diff --git a/pywal/backends/wal.py b/pywal/backends/wal.py
|
||||||
|
index a75fdc5..4339680 100644
|
||||||
|
--- a/pywal/backends/wal.py
|
||||||
|
+++ b/pywal/backends/wal.py
|
||||||
|
@@ -21,15 +21,7 @@ def imagemagick(color_count, img, magick_command):
|
||||||
|
|
||||||
|
def has_im():
|
||||||
|
"""Check to see if the user has im installed."""
|
||||||
|
- if shutil.which("magick"):
|
||||||
|
- return ["magick", "convert"]
|
||||||
|
-
|
||||||
|
- if shutil.which("convert"):
|
||||||
|
- return ["convert"]
|
||||||
|
-
|
||||||
|
- logging.error("Imagemagick wasn't found on your system.")
|
||||||
|
- logging.error("Try another backend. (wal --backend)")
|
||||||
|
- sys.exit(1)
|
||||||
|
+ return ["@convert@"]
|
||||||
|
|
||||||
|
|
||||||
|
def gen_colors(img):
|
|
@ -19,6 +19,14 @@ python3Packages.buildPythonApplication rec {
|
||||||
HOME=$PWD/tmp
|
HOME=$PWD/tmp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./convert.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace pywal/backends/wal.py --subst-var-by convert "${imagemagick}/bin/convert"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3.";
|
description = "Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3.";
|
||||||
homepage = https://github.com/dylanaraps/pywal;
|
homepage = https://github.com/dylanaraps/pywal;
|
|
@ -5017,7 +5017,7 @@ in
|
||||||
|
|
||||||
pytrainer = callPackage ../applications/misc/pytrainer { };
|
pytrainer = callPackage ../applications/misc/pytrainer { };
|
||||||
|
|
||||||
pywal = callPackage ../tools/graphics/pywal {};
|
pywal = with python3Packages; toPythonApplication pywal;
|
||||||
|
|
||||||
remarshal = callPackage ../development/tools/remarshal { };
|
remarshal = callPackage ../development/tools/remarshal { };
|
||||||
|
|
||||||
|
|
|
@ -3733,6 +3733,8 @@ in {
|
||||||
|
|
||||||
pyutil = callPackage ../development/python-modules/pyutil { };
|
pyutil = callPackage ../development/python-modules/pyutil { };
|
||||||
|
|
||||||
|
pywal = callPackage ../development/python-modules/pywal { };
|
||||||
|
|
||||||
pywebkitgtk = callPackage ../development/python-modules/pywebkitgtk { };
|
pywebkitgtk = callPackage ../development/python-modules/pywebkitgtk { };
|
||||||
|
|
||||||
pywinrm = callPackage ../development/python-modules/pywinrm { };
|
pywinrm = callPackage ../development/python-modules/pywinrm { };
|
||||||
|
|
Loading…
Reference in New Issue