From cb11b48c1bab856a7b73a9074b13cd7567c8d982 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Tue, 5 Nov 2024 13:52:32 +0100 Subject: [PATCH] lemurs: fix build error caused by https://github.com/rust-lang/rust/issues/115010 --- .../0001-fix-static-lifetime-string.patch | 22 +++++++++++++++++++ .../display-managers/lemurs/default.nix | 12 ++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/display-managers/lemurs/0001-fix-static-lifetime-string.patch diff --git a/pkgs/applications/display-managers/lemurs/0001-fix-static-lifetime-string.patch b/pkgs/applications/display-managers/lemurs/0001-fix-static-lifetime-string.patch new file mode 100644 index 0000000000000..fd2e06e2080f8 --- /dev/null +++ b/pkgs/applications/display-managers/lemurs/0001-fix-static-lifetime-string.patch @@ -0,0 +1,22 @@ +tree 18207ad257a4c0a9ffc4fd250360a91d0b5240cb +parent 37963b8ff6945ae8bdbabee658e5e36d0f67b84a +author Noa Aarts Tue Nov 5 13:49:49 2024 +0100 +committer Noa Aarts Tue Nov 5 13:49:49 2024 +0100 + +fix static lifetime for string + +This fixes a compiler error without changing functionality + +diff --git a/src/config.rs b/src/config.rs +index f4bca31..a4fc6bf 100644 +--- a/src/config.rs ++++ b/src/config.rs +@@ -645,7 +645,7 @@ struct Variable<'a> { + } + + impl<'a> Variable<'a> { +- const START_SYMBOL: &str = "$"; ++ const START_SYMBOL: &'static str = "$"; + + fn span(&self) -> std::ops::Range { + self.start..self.start + Self::START_SYMBOL.len() + self.ident.len() diff --git a/pkgs/applications/display-managers/lemurs/default.nix b/pkgs/applications/display-managers/lemurs/default.nix index bb085c8a406be..e2526f3225097 100644 --- a/pkgs/applications/display-managers/lemurs/default.nix +++ b/pkgs/applications/display-managers/lemurs/default.nix @@ -17,6 +17,11 @@ rustPlatform.buildRustPackage rec { hash = "sha256-YDopY+wdWlVL2X+/wc1tLSSqFclAkt++JXMK3VodD4s="; }; + patches = [ + # part of https://github.com/coastalwhite/lemurs/commit/09003a830400250ec7745939399fc942c505e6c6, but including the rest of the commit may be breaking + ./0001-fix-static-lifetime-string.patch + ]; + cargoHash = "sha256-uuHPJe+1VsnLRGbHtgTMrib6Tk359cwTDVfvtHnDToo="; buildInputs = [ @@ -30,8 +35,11 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "Customizable TUI display/login manager written in Rust"; homepage = "https://github.com/coastalwhite/lemurs"; - license = with licenses; [asl20 mit]; - maintainers = with maintainers; [jeremiahs]; + license = with licenses; [ + asl20 + mit + ]; + maintainers = with maintainers; [ jeremiahs ]; mainProgram = "lemurs"; }; }