about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--pkgs/by-name/i3/i3bar-river-patched/0001-revert-use-std-io-pipe.patch67
-rw-r--r--pkgs/by-name/i3/i3bar-river-patched/package.nix3
2 files changed, 0 insertions, 70 deletions
diff --git a/pkgs/by-name/i3/i3bar-river-patched/0001-revert-use-std-io-pipe.patch b/pkgs/by-name/i3/i3bar-river-patched/0001-revert-use-std-io-pipe.patch
deleted file mode 100644
index e1564753..00000000
--- a/pkgs/by-name/i3/i3bar-river-patched/0001-revert-use-std-io-pipe.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 017ed59239e48ca689af36f1ddaec877a3c86175 Mon Sep 17 00:00:00 2001
-From: Benedikt Peetz <benedikt.peetz@b-peetz.de>
-Date: Tue, 20 May 2025 17:10:47 +0200
-Subject: [PATCH] Revert "use std::io::pipe"
-
-This reverts commit c9cee90d765198cf72c5a5155ee0d8ab566d98a9 as this
-commit requires rustc 1.87.0
----
- src/main.rs | 24 +++++++++++++++++++-----
- 1 file changed, 19 insertions(+), 5 deletions(-)
-
-diff --git a/src/main.rs b/src/main.rs
-index 4a86593..2e7aeb2 100644
---- a/src/main.rs
-+++ b/src/main.rs
-@@ -18,8 +18,8 @@ mod text;
- mod utils;
- mod wm_info_provider;
- 
--use std::io::{self, ErrorKind, Read};
--use std::os::fd::AsRawFd;
-+use std::io::{self, ErrorKind};
-+use std::os::fd::{AsRawFd, RawFd};
- use std::path::PathBuf;
- 
- use clap::Parser;
-@@ -40,7 +40,7 @@ struct Cli {
- fn main() -> anyhow::Result<()> {
-     let args = Cli::parse();
- 
--    let (mut sig_read, sig_write) = io::pipe()?;
-+    let [sig_read, sig_write] = pipe(libc::O_NONBLOCK | libc::O_CLOEXEC)?;
-     signal_hook::low_level::pipe::register(SIGUSR1, sig_write)?;
- 
-     let mut conn = Connection::connect()?;
-@@ -55,8 +55,12 @@ fn main() -> anyhow::Result<()> {
-         Ok(event_loop::Action::Keep)
-     });
- 
--    el.register_with_fd(sig_read.as_raw_fd(), move |ctx| {
--        sig_read.read_exact(&mut [0u8]).unwrap();
-+    el.register_with_fd(sig_read, move |ctx| {
-+        let mut buf = [0u8];
-+        assert_eq!(
-+            unsafe { libc::read(sig_read, buf.as_mut_ptr().cast(), 1) },
-+            1
-+        );
-         ctx.state.toggle_visibility(ctx.conn);
-         Ok(event_loop::Action::Keep)
-     });
-@@ -104,3 +108,13 @@ fn main() -> anyhow::Result<()> {
-     el.run(&mut conn, &mut state)?;
-     unreachable!();
- }
-+
-+// TODO: remove once Rust 1.87.0 is stable
-+fn pipe(flags: libc::c_int) -> io::Result<[RawFd; 2]> {
-+    let mut fds = [0; 2];
-+    if unsafe { libc::pipe2(fds.as_mut_ptr(), flags) } == -1 {
-+        Err(io::Error::last_os_error())
-+    } else {
-+        Ok(fds)
-+    }
-+}
--- 
-2.49.0
-
diff --git a/pkgs/by-name/i3/i3bar-river-patched/package.nix b/pkgs/by-name/i3/i3bar-river-patched/package.nix
index a411fd32..87f78248 100644
--- a/pkgs/by-name/i3/i3bar-river-patched/package.nix
+++ b/pkgs/by-name/i3/i3bar-river-patched/package.nix
@@ -37,9 +37,6 @@ rustPlatform.buildRustPackage {
       hash = "sha256-HMNR/4Q2wDnqbN0ziXrG5DFeWgczOcw5AzLvGbJZKdo=";
     })
 
-    # 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
   ];