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

56 lines
1.3 KiB
Nix
Raw Normal View History

2017-06-03 19:22:07 +01:00
{ lib
2020-07-08 13:46:41 +01:00
, fetchFromGitHub
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-06-03 19:22:07 +01:00
buildPythonPackage rec {
2021-03-12 11:57:31 +00:00
version = "2.8.2";
pname = "powerline";
2020-07-08 13:46:41 +01:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
2021-03-12 11:57:31 +00:00
sha256 = "sha256-6V8ozl5KJQvytfflBmKJlIZQ5m3hkpCzMBtWZ2SzcQ0=";
2017-06-03 19:22:07 +01:00
};
2020-07-08 13:46:41 +01:00
propagatedBuildInputs = [
socat
psutil
hglib
pygit2
pyuv
] ++ 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 = {
homepage = "https://github.com/powerline/powerline";
2017-06-03 19:22:07 +01:00
description = "The ultimate statusline/prompt utility";
license = lib.licenses.mit;
};
}