linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / powerline / default.nix
blob292c44cf58fad17d781973ec6dcc30edb588dd50
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
4 , socat
5 , psutil
6 , hglib
7 , pygit2
8 , pyuv
9 , i3ipc
10 , stdenv
13 # TODO: bzr support is missing because nixpkgs switched to `breezy`
15 buildPythonPackage rec {
16   version  = "2.8.2";
17   pname = "powerline";
19   src = fetchFromGitHub {
20     owner = pname;
21     repo = pname;
22     rev = version;
23     sha256 = "sha256-6V8ozl5KJQvytfflBmKJlIZQ5m3hkpCzMBtWZ2SzcQ0=";
24   };
26   propagatedBuildInputs = [
27     socat
28     psutil
29     hglib
30     pygit2
31     pyuv
32   ] ++ lib.optionals (!stdenv.isDarwin) [ i3ipc ];
34   # tests are travis-specific
35   doCheck = false;
37   postInstall = ''
38     install -dm755 "$out/share/fonts/OTF/"
39     install -dm755 "$out/etc/fonts/conf.d"
40     install -m644 "font/PowerlineSymbols.otf" "$out/share/fonts/OTF/PowerlineSymbols.otf"
41     install -m644 "font/10-powerline-symbols.conf" "$out/etc/fonts/conf.d/10-powerline-symbols.conf"
43     install -dm755 "$out/share/fish/vendor_functions.d"
44     install -m644 "powerline/bindings/fish/powerline-setup.fish" "$out/share/fish/vendor_functions.d/powerline-setup.fish"
46     cp -ra powerline/bindings/{bash,shell,tcsh,tmux,vim,zsh} $out/share/
47     rm $out/share/*/*.py
48   '';
50   meta = {
51     homepage    = "https://github.com/powerline/powerline";
52     description = "The ultimate statusline/prompt utility";
53     license     = lib.licenses.mit;
54   };