From 0c5ca49ace5b7e8cd17554bc327017dc48b3f04f Mon Sep 17 00:00:00 2001 From: Justin ! Date: Wed, 5 Mar 2025 11:50:59 -0500 Subject: [PATCH] i3status-rust: format code --- .../window-managers/i3/status-rust.nix | 76 ++++++++++++------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/pkgs/applications/window-managers/i3/status-rust.nix b/pkgs/applications/window-managers/i3/status-rust.nix index 9058490ff7f0..8a10f6bb931e 100644 --- a/pkgs/applications/window-managers/i3/status-rust.nix +++ b/pkgs/applications/window-managers/i3/status-rust.nix @@ -1,20 +1,21 @@ -{ lib -, rustPlatform -, fetchFromGitHub -, pkg-config -, makeWrapper -, dbus -, libpulseaudio -, notmuch -, openssl -, ethtool -, lm_sensors -, iw -, iproute2 -, pipewire -, withICUCalendar ? false -, withPipewire ? true -, withNotmuch ? true +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + makeWrapper, + dbus, + libpulseaudio, + notmuch, + openssl, + ethtool, + lm_sensors, + iw, + iproute2, + pipewire, + withICUCalendar ? false, + withPipewire ? true, + withNotmuch ? true, }: rustPlatform.buildRustPackage rec { @@ -31,19 +32,29 @@ rustPlatform.buildRustPackage rec { useFetchCargoVendor = true; cargoHash = "sha256-EFFmH9aG7DvSA5rsAuszc1B8kcLdruSk3Hhp4V9t9Gk="; - nativeBuildInputs = [ pkg-config makeWrapper ] - ++ (lib.optionals withPipewire [ rustPlatform.bindgenHook ]); + nativeBuildInputs = [ + pkg-config + makeWrapper + ] ++ (lib.optionals withPipewire [ rustPlatform.bindgenHook ]); - buildInputs = [ dbus libpulseaudio openssl lm_sensors ] + buildInputs = + [ + dbus + libpulseaudio + openssl + lm_sensors + ] ++ (lib.optionals withPipewire [ pipewire ]) ++ (lib.optionals withNotmuch [ notmuch ]); - buildFeatures = [ - "maildir" - "pulseaudio" - ] ++ (lib.optionals withICUCalendar [ "icu_calendar" ]) - ++ (lib.optionals withPipewire [ "pipewire" ]) - ++ (lib.optionals withNotmuch [ "notmuch" ]); + buildFeatures = + [ + "maildir" + "pulseaudio" + ] + ++ (lib.optionals withICUCalendar [ "icu_calendar" ]) + ++ (lib.optionals withPipewire [ "pipewire" ]) + ++ (lib.optionals withNotmuch [ "notmuch" ]); prePatch = '' substituteInPlace src/util.rs \ @@ -56,7 +67,13 @@ rustPlatform.buildRustPackage rec { ''; postFixup = '' - wrapProgram $out/bin/i3status-rs --prefix PATH : ${lib.makeBinPath [ iproute2 ethtool iw ]} + wrapProgram $out/bin/i3status-rs --prefix PATH : ${ + lib.makeBinPath [ + iproute2 + ethtool + iw + ] + } ''; # Currently no tests are implemented, so we avoid building the package twice @@ -67,7 +84,10 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/greshake/i3status-rust"; license = licenses.gpl3Only; mainProgram = "i3status-rs"; - maintainers = with maintainers; [ backuitist globin ]; + maintainers = with maintainers; [ + backuitist + globin + ]; platforms = platforms.linux; }; }