1{ lib, buildPythonPackage, fetchPypi, imagemagick, feh, isPy3k }:
2
3buildPythonPackage rec {
4 pname = "pywal";
5 version = "3.3.0";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "1drha9kshidw908k7h3gd9ws2bl64ms7bjcsa83pwb3hqa9bkspg";
10 };
11
12 preCheck = ''
13 mkdir tmp
14 HOME=$PWD/tmp
15 '';
16
17 patches = [
18 ./convert.patch
19 ./feh.patch
20 ];
21
22 # Invalid syntax
23 disabled = !isPy3k;
24
25 postPatch = ''
26 substituteInPlace pywal/backends/wal.py --subst-var-by convert "${imagemagick}/bin/convert"
27 substituteInPlace pywal/wallpaper.py --subst-var-by feh "${feh}/bin/feh"
28 '';
29
30 meta = with lib; {
31 description = "Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3";
32 homepage = "https://github.com/dylanaraps/pywal";
33 license = licenses.mit;
34 maintainers = with maintainers; [ Fresheyeball ];
35 };
36}