From 2bd647656316561fced7d66ebe117fc4c18d051e Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 19 Aug 2024 12:36:51 -0300 Subject: [PATCH 1/3] swayest-workstyle: remove maintainer miangraham Because theey is inactive. --- pkgs/by-name/sw/swayest-workstyle/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/sw/swayest-workstyle/package.nix b/pkgs/by-name/sw/swayest-workstyle/package.nix index 2867db53f371..6f4490224889 100644 --- a/pkgs/by-name/sw/swayest-workstyle/package.nix +++ b/pkgs/by-name/sw/swayest-workstyle/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/Lyr-7D1h/swayest_workstyle"; license = licenses.mit; platforms = platforms.linux; - maintainers = with maintainers; [ miangraham ]; + maintainers = with maintainers; [ ]; mainProgram = "sworkstyle"; }; } From f2d1e8350416fc56240aa02645676b70379bc1fb Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 19 Aug 2024 12:39:53 -0300 Subject: [PATCH 2/3] swayest-workstyle: adopt by AndersonTorres Also nixfmt-rfc-style and get rid of nested with --- pkgs/by-name/sw/swayest-workstyle/package.nix | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/sw/swayest-workstyle/package.nix b/pkgs/by-name/sw/swayest-workstyle/package.nix index 6f4490224889..19536fe03a42 100644 --- a/pkgs/by-name/sw/swayest-workstyle/package.nix +++ b/pkgs/by-name/sw/swayest-workstyle/package.nix @@ -1,6 +1,7 @@ -{ lib -, rustPlatform -, fetchFromGitHub +{ + lib, + rustPlatform, + fetchFromGitHub, }: rustPlatform.buildRustPackage rec { @@ -11,19 +12,20 @@ rustPlatform.buildRustPackage rec { owner = "Lyr-7D1h"; repo = "swayest_workstyle"; rev = version; - sha256 = "sha256-Dk6rAiz7PXUfyy9fWMtSVRjaWWl66n38gTNyWKqeqkU="; + hash = "sha256-Dk6rAiz7PXUfyy9fWMtSVRjaWWl66n38gTNyWKqeqkU="; }; cargoHash = "sha256-sLQPq3tyWq1TxxeFyg05qBt+KGI/vO0jLU7wJLiqcYA="; - doCheck = false; # No tests + # No tests + doCheck = false; - meta = with lib; { + meta = { description = "Map sway workspace names to icons defined depending on the windows inside of the workspace"; homepage = "https://github.com/Lyr-7D1h/swayest_workstyle"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ ]; + license = lib.licenses.mit; mainProgram = "sworkstyle"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.linux; }; } From 6002d45a9622accea71cdcbd1be17c465c5ae756 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 19 Aug 2024 12:44:45 -0300 Subject: [PATCH 3/3] swayest-workstyle: get rid of rec Because I do not like rec. Further, https://nix.dev/guides/best-practices.html#recursive-attribute-set-rec Further I believe source acquisition should be detached from the derivation(s) -- but this is an issue for another issue. --- pkgs/by-name/sw/swayest-workstyle/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sw/swayest-workstyle/package.nix b/pkgs/by-name/sw/swayest-workstyle/package.nix index 19536fe03a42..31e847452874 100644 --- a/pkgs/by-name/sw/swayest-workstyle/package.nix +++ b/pkgs/by-name/sw/swayest-workstyle/package.nix @@ -4,16 +4,18 @@ fetchFromGitHub, }: -rustPlatform.buildRustPackage rec { +let pname = "swayest-workstyle"; version = "1.3.5"; - src = fetchFromGitHub { owner = "Lyr-7D1h"; repo = "swayest_workstyle"; rev = version; hash = "sha256-Dk6rAiz7PXUfyy9fWMtSVRjaWWl66n38gTNyWKqeqkU="; }; +in +rustPlatform.buildRustPackage { + inherit pname version src; cargoHash = "sha256-sLQPq3tyWq1TxxeFyg05qBt+KGI/vO0jLU7wJLiqcYA=";