biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / window-managers / i3 / status-rust.nix
blobb9ced38b5fe4cc8cfe4d34e35b54b4c0c95aad16
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , pkg-config
5 , makeWrapper
6 , dbus
7 , libpulseaudio
8 , notmuch
9 , openssl
10 , ethtool
11 , lm_sensors
12 , iw
13 , iproute2
14 , withICUCalendar ? false
17 rustPlatform.buildRustPackage rec {
18   pname = "i3status-rust";
19   version = "0.33.1";
21   src = fetchFromGitHub {
22     owner = "greshake";
23     repo = pname;
24     rev = "refs/tags/v${version}";
25     hash = "sha256-9lzzjb6tDfgqjAT9mS/cWfC6ucNXoJ8JJwtZ0FZqlDA=";
26   };
28   cargoHash = "sha256-yeijJl94v+yKMVnU/Fjzapab/nExlvoznrx8Ydz/RvM=";
30   nativeBuildInputs = [ pkg-config makeWrapper ];
32   buildInputs = [ dbus libpulseaudio notmuch openssl lm_sensors ];
34   buildFeatures = [
35     "notmuch"
36     "maildir"
37     "pulseaudio"
38   ] ++ (lib.optionals withICUCalendar [ "icu_calendar" ]);
40   prePatch = ''
41     substituteInPlace src/util.rs \
42       --replace "/usr/share/i3status-rust" "$out/share"
43   '';
45   postInstall = ''
46     mkdir -p $out/share
47     cp -R examples files/* $out/share
48   '';
50   postFixup = ''
51     wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [ iproute2 ethtool iw ]}
52   '';
54   # Currently no tests are implemented, so we avoid building the package twice
55   doCheck = false;
57   meta = with lib; {
58     description = "Very resource-friendly and feature-rich replacement for i3status";
59     homepage = "https://github.com/greshake/i3status-rust";
60     license = licenses.gpl3Only;
61     mainProgram = "i3status-rs";
62     maintainers = with maintainers; [ backuitist globin ];
63     platforms = platforms.linux;
64   };