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

54 lines
1.1 KiB
Nix
Raw Normal View History

2017-06-03 19:22:07 +01:00
{ lib
2020-07-08 13:46:41 +01:00
, fetchFromGitHub
, python
2017-06-03 19:22:07 +01:00
, buildPythonPackage
2020-07-08 13:46:41 +01:00
, socat
2017-06-03 19:22:07 +01:00
, psutil
2020-07-08 13:46:41 +01:00
, hglib
2017-06-03 19:22:07 +01:00
, pygit2
2020-07-08 13:46:41 +01:00
, pyuv
, i3ipc
2017-06-03 19:22:07 +01:00
}:
2020-07-08 13:46:41 +01:00
# TODO: bzr support is missing because nixpkgs switched to `breezy`
2017-06-03 19:22:07 +01:00
buildPythonPackage rec {
2020-07-08 13:46:41 +01:00
version = "2.8.1";
pname = "powerline";
2020-07-08 13:46:41 +01:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "0xscckcbw75pbcl4546ndrjs4682pn2sqqrd6qvqm0s6zswg7a0y";
2017-06-03 19:22:07 +01:00
};
2020-07-08 13:46:41 +01:00
propagatedBuildInputs = [
socat
psutil
hglib
pygit2
pyuv
i3ipc
];
2017-06-03 19:22:07 +01:00
2020-07-08 13:46:41 +01:00
# tests are travis-specific
2017-06-03 19:22:07 +01:00
doCheck = false;
postInstall = ''
install -dm755 "$out/share/fonts/OTF/"
install -dm755 "$out/etc/fonts/conf.d"
install -m644 "font/PowerlineSymbols.otf" "$out/share/fonts/OTF/PowerlineSymbols.otf"
install -m644 "font/10-powerline-symbols.conf" "$out/etc/fonts/conf.d/10-powerline-symbols.conf"
2020-07-08 13:46:41 +01:00
cp -ra powerline/bindings/{bash,fish,shell,tcsh,tmux,vim,zsh} $out/share/
rm $out/share/*/*.py
'';
2017-06-03 19:22:07 +01:00
meta = {
homepage = "https://github.com/powerline/powerline";
2017-06-03 19:22:07 +01:00
description = "The ultimate statusline/prompt utility";
license = lib.licenses.mit;
};
}