nixpkgs/pkgs/development/python-modules/pywal/default.nix

37 lines
863 B
Nix
Raw Normal View History

2019-01-22 15:16:59 +00:00
{ lib, buildPythonPackage, fetchPypi, imagemagick, feh, isPy3k }:
2018-04-06 07:57:20 +00:00
2019-01-22 15:16:59 +00:00
buildPythonPackage rec {
2018-04-06 07:57:20 +00:00
pname = "pywal";
version = "3.3.0";
2018-04-06 07:57:20 +00:00
2019-01-22 15:16:59 +00:00
src = fetchPypi {
2018-04-06 07:57:20 +00:00
inherit pname version;
sha256 = "1drha9kshidw908k7h3gd9ws2bl64ms7bjcsa83pwb3hqa9bkspg";
2018-04-06 07:57:20 +00:00
};
preCheck = ''
mkdir tmp
HOME=$PWD/tmp
'';
patches = [
./convert.patch
./feh.patch
];
2019-01-22 15:16:59 +00:00
# Invalid syntax
disabled = !isPy3k;
postPatch = ''
substituteInPlace pywal/backends/wal.py --subst-var-by convert "${imagemagick}/bin/convert"
substituteInPlace pywal/wallpaper.py --subst-var-by feh "${feh}/bin/feh"
'';
2018-04-06 07:57:20 +00:00
meta = with lib; {
description = "Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3";
homepage = "https://github.com/dylanaraps/pywal";
2018-04-06 07:57:20 +00:00
license = licenses.mit;
maintainers = with maintainers; [ Fresheyeball ];
};
}