about summary refs log tree commit diff stats
path: root/pkgs/by-name/i3/i3bar-river-patched/package.nix
blob: 88af5d8a188b37c5584d46f1a04262a7f609c0b7 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 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>.
{
  lib,
  fetchFromGitHub,
  rustPlatform,
  pkg-config,
  pango,
  fetchpatch2,
}:
rustPlatform.buildRustPackage {
  pname = "i3bar-river-patched";
  version = "1.1.0-unstable-2025-05-20";

  src = fetchFromGitHub {
    owner = "MaxVerevkin";
    repo = "i3bar-river";
    rev = "73446cac559b10adf4beb5567a816d1be5273457";
    hash = "sha256-NxlFKTnd2erHtSG56aWlZEkWVzBqe2hqQuVAWDdBq2c=";
  };

  useFetchCargoVendor = true;
  cargoHash = "sha256-8sub8cXC/1iDY6v/9opO4FiLAo9CFrGJSDPNQydGvhQ=";

  cargoPatches = [
    # Add a separate theme for unfocused outputs.
    (fetchpatch2 {
      name = "Add support for special theme for unfocused outputs";
      url = "https://patch-diff.githubusercontent.com/raw/MaxVerevkin/i3bar-river/pull/44.patch";
      hash = "sha256-yH3K52kAXGW19maP77gOTHSauqQX7Px8qCZDua6wo4w=";
    })

    # TODO(@bpeetz): Remove this patch once the rustc update hits unstable. <2025-05-20>
    ./0001-revert-use-std-io-pipe.patch

    # TODO(@bpeetz): Open an issues, whether something like that could be upstreamed. <2025-05-20>
    ./0002-feat-crate-bar-Put-the-leftmost-block-in-the-middle-.patch
  ];

  # Remove the WMs that I don't use.
  buildNoDefaultFeatures = true;
  buildFeatures = [
    # "hyprland"
    # "niri"
    "river"
  ];

  nativeBuildInputs = [pkg-config];
  buildInputs = [pango];

  meta = with lib; {
    description = "Port of i3bar for river";
    homepage = "https://github.com/MaxVerevkin/i3bar-river";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [nicegamer7];
    mainProgram = "i3bar-river";
    platforms = platforms.linux;
  };
}