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
|
2021-02-09 21:04:05 +00:00
|
|
|
, stdenv
|
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-10-19 13:57:19 +01:00
|
|
|
|
2017-06-03 19:22:07 +01:00
|
|
|
buildPythonPackage rec {
|
2020-07-08 13:46:41 +01:00
|
|
|
version = "2.8.1";
|
2017-11-09 11:26:09 +00:00
|
|
|
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
|
2021-02-09 22:25:38 +00:00
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [ 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-09 20:37:43 +01:00
|
|
|
install -dm755 "$out/share/fish/vendor_functions.d"
|
|
|
|
install -m644 "powerline/bindings/fish/powerline-setup.fish" "$out/share/fish/vendor_functions.d/powerline-setup.fish"
|
|
|
|
|
|
|
|
cp -ra powerline/bindings/{bash,shell,tcsh,tmux,vim,zsh} $out/share/
|
2020-07-08 13:46:41 +01:00
|
|
|
rm $out/share/*/*.py
|
|
|
|
'';
|
2017-06-03 19:22:07 +01:00
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/powerline/powerline";
|
2017-06-03 19:22:07 +01:00
|
|
|
description = "The ultimate statusline/prompt utility";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|