1{ lib
2, fetchurl
3, buildPythonPackage
4, psutil
5, pygit2
6}:
7
8# The source of this package needs to be patched to include the full path to
9# the executables of git, mercurial and bazaar.
10
11buildPythonPackage rec {
12 version = "2.7";
13 pname = "powerline";
14
15 src = fetchurl {
16 url = "https://github.com/powerline/powerline/archive/${version}.tar.gz";
17 name = "${pname}-${version}.tar.gz";
18 sha256 = "1h1j2rfphvfdq6mmfyn5bql45hzrwxkhpc2jcwf0vrl3slzkl5s5";
19 };
20
21 propagatedBuildInputs = [ psutil pygit2];
22
23# error: This is still beta and some tests still fail
24 doCheck = false;
25
26 postInstall = ''
27 install -dm755 "$out/share/fonts/OTF/"
28 install -dm755 "$out/etc/fonts/conf.d"
29 install -m644 "font/PowerlineSymbols.otf" "$out/share/fonts/OTF/PowerlineSymbols.otf"
30 install -m644 "font/10-powerline-symbols.conf" "$out/etc/fonts/conf.d/10-powerline-symbols.conf"
31
32 install -dm755 "$out/share/vim/vimfiles/plugin"
33 install -m644 "powerline/bindings/vim/plugin/powerline.vim" "$out/share/vim/vimfiles/plugin/powerline.vim"
34
35 install -dm755 "$out/share/zsh/site-contrib"
36 install -m644 "powerline/bindings/zsh/powerline.zsh" "$out/share/zsh/site-contrib/powerline.zsh"
37
38 install -dm755 "$out/share/tmux"
39 install -m644 "powerline/bindings/tmux/powerline.conf" "$out/share/tmux/powerline.conf"
40 '';
41
42 meta = {
43 homepage = https://github.com/powerline/powerline;
44 description = "The ultimate statusline/prompt utility";
45 license = lib.licenses.mit;
46 };
47}