about summary refs log tree commit diff stats
path: root/pkgs/by-name/i3/i3status-rust-patched/package.nix
blob: 9f172d49d5bca490a497c7fe25fb445a6f2f166c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# nixos-config - My current NixOS configuration
#
# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of my nixos-config.
#
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
{
  i3status-rust,
  fetchpatch2,
}:
i3status-rust.overrideAttrs (final: prev: {
  pname = "${prev.pname}-patched";

  patches =
    (prev.patches or [])
    ++ [
      # Btrfs support for disk_space block.
      (fetchpatch2 {
        name = "disk_space: Support btrfs backend";
        url = "https://patch-diff.githubusercontent.com/raw/greshake/i3status-rust/pull/2159.patch";
        hash = "sha256-S2/biX6FTLJNfI9QVgwr+V8IGMRnSFIZnTrhc+1LvqQ=";
      })

      # Correctly calculate the used memory.
      (fetchpatch2 {
        name = "memory: Avoid estimating available memory, use kernel estimate instead";
        url = "https://patch-diff.githubusercontent.com/raw/greshake/i3status-rust/pull/2160.patch";
        hash = "sha256-1wB2KpXhC/UIxAgRioOYj/bnrzRSuaHAdbeoZ2O5E/Y=";
      })
    ];
})