uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
21
pkgs/development/python-modules/pywal/convert.patch
Normal file
21
pkgs/development/python-modules/pywal/convert.patch
Normal file
|
|
@ -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):
|
||||
41
pkgs/development/python-modules/pywal/default.nix
Normal file
41
pkgs/development/python-modules/pywal/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, imagemagick, feh, isPy3k }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pywal";
|
||||
version = "3.3.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1drha9kshidw908k7h3gd9ws2bl64ms7bjcsa83pwb3hqa9bkspg";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./convert.patch
|
||||
./feh.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pywal/backends/wal.py --subst-var-by convert "${imagemagick}/bin/convert"
|
||||
substituteInPlace pywal/wallpaper.py --subst-var-by feh "${feh}/bin/feh"
|
||||
'';
|
||||
|
||||
# Invalid syntax
|
||||
disabled = !isPy3k;
|
||||
|
||||
preCheck = ''
|
||||
mkdir tmp
|
||||
HOME=$PWD/tmp
|
||||
|
||||
for f in tests/test_export.py tests/test_util.py ; do
|
||||
substituteInPlace "$f" \
|
||||
--replace '/tmp/' "$TMPDIR/"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3";
|
||||
homepage = "https://github.com/dylanaraps/pywal";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ Fresheyeball ];
|
||||
};
|
||||
}
|
||||
39
pkgs/development/python-modules/pywal/feh.patch
Normal file
39
pkgs/development/python-modules/pywal/feh.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
commit c31faa212e09aa62c232d9008e05976b1cdc9ee5
|
||||
Author: Frederik Rietdijk <fridh@fridh.nl>
|
||||
Date: Wed Dec 26 12:54:32 2018 +0100
|
||||
|
||||
nix: hardcode feh
|
||||
|
||||
diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py
|
||||
index ba61e66..fad34f7 100644
|
||||
--- a/pywal/wallpaper.py
|
||||
+++ b/pywal/wallpaper.py
|
||||
@@ -47,27 +47,7 @@ def xfconf(path, img):
|
||||
|
||||
def set_wm_wallpaper(img):
|
||||
"""Set the wallpaper for non desktop environments."""
|
||||
- if shutil.which("feh"):
|
||||
- util.disown(["feh", "--bg-fill", img])
|
||||
-
|
||||
- elif shutil.which("nitrogen"):
|
||||
- util.disown(["nitrogen", "--set-zoom-fill", img])
|
||||
-
|
||||
- elif shutil.which("bgs"):
|
||||
- util.disown(["bgs", "-z", img])
|
||||
-
|
||||
- elif shutil.which("hsetroot"):
|
||||
- util.disown(["hsetroot", "-fill", img])
|
||||
-
|
||||
- elif shutil.which("habak"):
|
||||
- util.disown(["habak", "-mS", img])
|
||||
-
|
||||
- elif shutil.which("display"):
|
||||
- util.disown(["display", "-backdrop", "-window", "root", img])
|
||||
-
|
||||
- else:
|
||||
- logging.error("No wallpaper setter found.")
|
||||
- return
|
||||
+ return util.disown(["@feh@", "--bg-fill", img])
|
||||
|
||||
|
||||
def set_desktop_wallpaper(desktop, img):
|
||||
Loading…
Add table
Add a link
Reference in a new issue