summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenperidge <denperidge@gmail.com>2024-06-06 20:23:32 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-09-09 13:08:01 +0000
commit21222437de68fe3cf335040a424bb46efb54f18c (patch)
treee290ac2b35f8d6e5c96b750930a30327782bbbfa
parentmaintainers: add denperidge (diff)
downloadnixpkgs-origin/backport-317805-to-release-24.05.tar.gz
leftwm-{config,theme}: update, migrate to by-name, refactororigin/backport-317805-to-release-24.05
(cherry picked from commit 8f8d42c893e81157f4937719047f5013d3270dcb)
-rw-r--r--pkgs/applications/window-managers/leftwm/default.nix (renamed from pkgs/applications/window-managers/leftwm/leftwm/default.nix)0
-rw-r--r--pkgs/applications/window-managers/leftwm/leftwm-config/0001-rm-unstable-is-some-with-feature.patch93
-rw-r--r--pkgs/applications/window-managers/leftwm/leftwm-config/default.nix26
-rw-r--r--pkgs/applications/window-managers/leftwm/leftwm-theme/default.nix35
-rw-r--r--pkgs/by-name/le/leftwm-config/package.nix27
-rw-r--r--pkgs/by-name/le/leftwm-theme/package.nix43
-rw-r--r--pkgs/top-level/all-packages.nix6
7 files changed, 71 insertions, 159 deletions
diff --git a/pkgs/applications/window-managers/leftwm/leftwm/default.nix b/pkgs/applications/window-managers/leftwm/default.nix
index ea2a41413a08..ea2a41413a08 100644
--- a/pkgs/applications/window-managers/leftwm/leftwm/default.nix
+++ b/pkgs/applications/window-managers/leftwm/default.nix
diff --git a/pkgs/applications/window-managers/leftwm/leftwm-config/0001-rm-unstable-is-some-with-feature.patch b/pkgs/applications/window-managers/leftwm/leftwm-config/0001-rm-unstable-is-some-with-feature.patch
deleted file mode 100644
index 96e0ba20dfaf..000000000000
--- a/pkgs/applications/window-managers/leftwm/leftwm-config/0001-rm-unstable-is-some-with-feature.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/src/main.rs b/src/main.rs
-index f9ccde5..3253b17 100644
---- a/src/main.rs
-+++ b/src/main.rs
-@@ -1,4 +1,3 @@
--#![feature(is_some_with)]
- #![allow(
- clippy::module_name_repetitions,
- clippy::too_many_lines,
-diff --git a/src/tui/key_handler.rs b/src/tui/key_handler.rs
-index 25cede0..cc875cc 100644
---- a/src/tui/key_handler.rs
-+++ b/src/tui/key_handler.rs
-@@ -247,7 +247,7 @@ fn right(app: &mut App) -> Result<bool> {
- }
- }
- Window::WindowRules { index, empty } => {
-- if app.current_popup.is_some_and(|i| *i == 2) {
-+ if app.current_popup.map(|i| i == 2).unwrap_or(false) {
- if let PopupState::Int { current, min, max } = app.current_popup_state {
- if current < max {
- app.current_popup_state = PopupState::Int {
-@@ -315,7 +315,7 @@ fn left(app: &mut App) -> Result<bool> {
- }
- }
- Window::WindowRules { index, empty } => {
-- if app.current_popup.is_some_and(|i| *i == 2) {
-+ if app.current_popup.map(|i| i == 2).unwrap_or(false) {
- if let PopupState::Int { current, min, max } = app.current_popup_state {
- if current > min {
- app.current_popup_state = PopupState::Int {
-@@ -491,7 +491,8 @@ fn enter_home(app: &mut App) -> Result<bool> {
- .current_config
- .workspaces
- .as_ref()
-- .is_some_and(|v| v.is_empty())
-+ .map(|v| v.is_empty())
-+ .unwrap_or(false)
- || app.current_config.workspaces.as_ref().is_none(),
- };
- }
-@@ -502,7 +503,8 @@ fn enter_home(app: &mut App) -> Result<bool> {
- .current_config
- .tags
- .as_ref()
-- .is_some_and(|v| v.is_empty())
-+ .map(|v| v.is_empty())
-+ .unwrap_or(false)
- || app.current_config.tags.as_ref().is_none(),
- }
- }
-@@ -513,7 +515,8 @@ fn enter_home(app: &mut App) -> Result<bool> {
- .current_config
- .window_rules
- .as_ref()
-- .is_some_and(|v| v.is_empty())
-+ .map(|v| v.is_empty())
-+ .unwrap_or(false)
- || app.current_config.window_rules.as_ref().is_none(),
- }
- }
-@@ -524,7 +527,8 @@ fn enter_home(app: &mut App) -> Result<bool> {
- .current_config
- .scratchpad
- .as_ref()
-- .is_some_and(|v| v.is_empty())
-+ .map(|v| v.is_empty())
-+ .unwrap_or(false)
- || app.current_config.scratchpad.as_ref().is_none(),
- }
- }
-@@ -1445,7 +1449,7 @@ fn enter_scratchpads(app: &mut App, index: usize, empty: bool) -> Result<bool> {
- }
-
- fn enter_keybinds(app: &mut App, index: usize, empty: bool) -> Result<bool> {
-- if empty && app.config_list_state.selected().is_some_and(|i| *i == 2) {
-+ if empty && app.config_list_state.selected().map(|i| i == 2).unwrap_or(false) {
- app.current_config.keybind.push(Keybind::default());
- } else {
- match app.current_popup {
-diff --git a/src/tui/popups.rs b/src/tui/popups.rs
-index 7dddc12..c73edc5 100644
---- a/src/tui/popups.rs
-+++ b/src/tui/popups.rs
-@@ -130,7 +130,7 @@ pub fn modkey(
- }
-
- fn check_modifier(modifier: &Option<KeyModifier>, name: &str) -> bool {
-- modifier.is_some_and(|m| if let Single(s) = m { *s == name } else { false })
-+ modifier.as_ref().map(|m| if let Single(s) = m { s == name } else { false }).unwrap_or(false)
- }
-
- pub fn max_window_width(
diff --git a/pkgs/applications/window-managers/leftwm/leftwm-config/default.nix b/pkgs/applications/window-managers/leftwm/leftwm-config/default.nix
deleted file mode 100644
index 52d3546c4549..000000000000
--- a/pkgs/applications/window-managers/leftwm/leftwm-config/default.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ stdenv, lib, fetchFromGitHub, rustPlatform }:
-
-rustPlatform.buildRustPackage rec {
- pname = "leftwm-config";
- version = "0.1.0";
-
- src = fetchFromGitHub {
- owner = "leftwm";
- repo = pname;
- rev = version;
- sha256 = "sha256-hWxyzgWWh6CBxpbbXfd888Q70cCZQ9FESDijOSXtdZA=";
- };
-
- cargoSha256 = "sha256-NfBteoknxveIGrpSuDe70LLnGvN3nb9gvbVbbwsYD4A=";
-
- patches = [ ./0001-rm-unstable-is-some-with-feature.patch ];
-
- meta = with lib; {
- broken = (stdenv.isLinux && stdenv.isAarch64);
- description = "A little satellite utility for LeftWM";
- homepage = "https://github.com/leftwm/leftwm-config";
- license = licenses.bsd3;
- platforms = platforms.linux;
- maintainers = with maintainers; [ yanganto ];
- };
-}
diff --git a/pkgs/applications/window-managers/leftwm/leftwm-theme/default.nix b/pkgs/applications/window-managers/leftwm/leftwm-theme/default.nix
deleted file mode 100644
index d3b42001f629..000000000000
--- a/pkgs/applications/window-managers/leftwm/leftwm-theme/default.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{ stdenv, lib, fetchFromGitHub, rustPlatform, openssl, pkg-config }:
-
-rustPlatform.buildRustPackage rec {
- pname = "leftwm-theme";
- version = "unstable-2022-12-24";
-
- src = fetchFromGitHub {
- owner = "leftwm";
- repo = pname;
- rev = "7f2292f91f31d14a30d49372198c0e7cbe183223";
- sha256 = "sha256-tYT1eT7Rbs/6zZcl9eWsOA651dUGoXc7eRtVK8fn610=";
- };
-
- cargoSha256 = "sha256-3ZwVmyLvDq2z1FEqNuBlEgJLQ9KwcWj/jRlPNCNjCE4=";
-
- checkFlags = [
- # direct writing /tmp
- "--skip=models::config::test::test_config_new"
- # with network access when testing
- "--skip=operations::update::test::test_update_repos"
- ];
-
- nativeBuildInputs = [ pkg-config ];
-
- buildInputs = [ openssl ];
-
- meta = with lib; {
- broken = (stdenv.isLinux && stdenv.isAarch64);
- description = "A theme manager for LeftWM";
- homepage = "https://github.com/leftwm/leftwm-theme";
- license = licenses.bsd3;
- platforms = platforms.linux;
- maintainers = with maintainers; [ yanganto ];
- };
-}
diff --git a/pkgs/by-name/le/leftwm-config/package.nix b/pkgs/by-name/le/leftwm-config/package.nix
new file mode 100644
index 000000000000..90c91a261e0d
--- /dev/null
+++ b/pkgs/by-name/le/leftwm-config/package.nix
@@ -0,0 +1,27 @@
+{
+ lib,
+ fetchFromGitHub,
+ rustPlatform,
+}:
+
+rustPlatform.buildRustPackage {
+ pname = "leftwm-config";
+ version = "0-unstable-2024-03-13";
+
+ src = fetchFromGitHub {
+ owner = "leftwm";
+ repo = "leftwm-config";
+ rev = "a9f2f21ece3a01d6c36610295ae3163644d3f99e";
+ hash = "sha256-wyb/26EyNyBJeTDUvnMxlMiQjaCGBES8t4VteNY1I/A=";
+ };
+
+ cargoHash = "sha256-U3mgbG9h2cDqr0aqxbI2CJUOweIoDXDxmsWg0zxolSo=";
+
+ meta = {
+ description = "Little satellite utility for LeftWM";
+ homepage = "https://github.com/leftwm/leftwm-config";
+ maintainers = with lib.maintainers; [ denperidge ];
+ license = lib.licenses.bsd3;
+ platforms = lib.platforms.linux;
+ };
+}
diff --git a/pkgs/by-name/le/leftwm-theme/package.nix b/pkgs/by-name/le/leftwm-theme/package.nix
new file mode 100644
index 000000000000..c10601a0f1f9
--- /dev/null
+++ b/pkgs/by-name/le/leftwm-theme/package.nix
@@ -0,0 +1,43 @@
+{
+ lib,
+ fetchFromGitHub,
+ rustPlatform,
+ openssl,
+ pkg-config,
+}:
+
+rustPlatform.buildRustPackage {
+ pname = "leftwm-theme";
+ version = "unstable-2024-03-05";
+
+ src = fetchFromGitHub {
+ owner = "leftwm";
+ repo = "leftwm-theme";
+ rev = "b394824ff874b269a90c29e2d45b0cacc4d209f5";
+ hash = "sha256-cV4tY1qKNluSSGf+WwKFK3iVE7cMevafl6qQvhy1flE=";
+ };
+
+ cargoHash = "sha256-VEQn1LFXiZCVR2WgOFoHo18d3cdIoq9/zNjg8GMs0j8=";
+
+ checkFlags = [
+ # direct writing /tmp
+ "--skip=models::config::test::test_config_new"
+ # with network access when testing
+ "--skip=operations::update::test::test_update_repos"
+ ];
+
+ nativeBuildInputs = [ pkg-config ];
+ buildInputs = [ openssl ];
+
+ env = {
+ OPENSSL_NO_VENDOR = 1;
+ };
+
+ meta = {
+ description = "Theme manager for LeftWM";
+ homepage = "https://github.com/leftwm/leftwm-theme";
+ license = lib.licenses.bsd3;
+ platforms = lib.platforms.linux;
+ maintainers = with lib.maintainers; [ denperidge ];
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e1c6380b4bf4..21ee5326b1e0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -31561,11 +31561,7 @@ with pkgs;
keylight-controller-mschneider82 = callPackage ../applications/misc/keylight-controller-mschneider82 { };
- leftwm = callPackage ../applications/window-managers/leftwm/leftwm { };
-
- leftwm-config = callPackage ../applications/window-managers/leftwm/leftwm-config { };
-
- leftwm-theme = callPackage ../applications/window-managers/leftwm/leftwm-theme { };
+ leftwm = callPackage ../applications/window-managers/leftwm { };
levant = callPackage ../applications/networking/cluster/levant { };