From 6a1b7d27c0359b54b273101008d1643592125a25 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 27 Feb 2025 21:27:53 +0100 Subject: [PATCH 1/4] lock: update --- lock.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lock.nix b/lock.nix index 8cf15a1..38ae8c7 100644 --- a/lock.nix +++ b/lock.nix @@ -4,15 +4,15 @@ sha256 = "1rq8mrlmbzpcbv9ys0x88alw30ks70jlmvnfr2j8v830yy5wvw7h"; }; nixpkgs = { - revision = "0b73e36b1962620a8ac551a37229dd8662dac5c8"; - sha256 = "15avzb7r8iflfsl4glcvgqk1bn4fy9xr7fq7cjw8lg1vsg6qndf2"; + revision = "5d7db4668d7a0c6cc5fc8cf6ef33b008b2b1ed8b"; + sha256 = "1xxfs0jk98236v3h7gwhhai7j33sri0phvgp5ng24x4lfvznwy71"; }; nixpkgs-unstable = { - revision = "2ff53fe64443980e139eaa286017f53f88336dd0"; - sha256 = "0ms5nbr2vmvhbr531bxvyi10nz9iwh5cry12pl416gyvf0mxixpv"; + revision = "5135c59491985879812717f4c9fea69604e7f26f"; + sha256 = "09qy7zv80bkd9ighsw0bdxjq70dw3qjnyvg7il1fycrsgs5x1gan"; }; cosmic-modules = { - revision = "51f16d9cd5ab24afa8b940d0e5c83965c46ef430"; - sha256 = "1xvp160gd46bx0fhbyls75dmsq05qhcxkd2mwy3irzg8di1986ny"; + revision = "c5a9b54c1ed6586e60ed6acd2178704ce1824c19"; + sha256 = "1wagkh8xkpq06nzwfy7jpjgr2wnigk15871jcvap3k3p4is3ykik"; }; } From dc0351c2c9e7601f8cda81e4f0f9ed32ea22e278 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 27 Feb 2025 21:29:19 +0100 Subject: [PATCH 2/4] outputs: use lib.genAttrs for system attrset generation --- outputs.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/outputs.nix b/outputs.nix index 9f619ac..adc23e6 100644 --- a/outputs.nix +++ b/outputs.nix @@ -13,10 +13,7 @@ systems = [ ]; # (system -> x) -> { [system] := x } -forEachSystem = x: lib.pipe systems [ - (builtins.map (system: { name = system; value = x system; })) - builtins.listToAttrs -]; +forEachSystem = lib.genAttrs systems; self = { inherit inputs lib self; From d874ae3c0b7ce48993a340925b24df34cef1926c Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 27 Feb 2025 21:32:30 +0100 Subject: [PATCH 3/4] pkgs/SPFlashTool5: use buildInputs for libraries --- pkgs/by-name/sp/SPFlashTool5/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sp/SPFlashTool5/package.nix b/pkgs/by-name/sp/SPFlashTool5/package.nix index 98612ca..d837743 100644 --- a/pkgs/by-name/sp/SPFlashTool5/package.nix +++ b/pkgs/by-name/sp/SPFlashTool5/package.nix @@ -31,6 +31,10 @@ stdenvNoCC.mkDerivation (self: { }; nativeBuildInputs = [ autoPatchelfHook + makeWrapper + unrar + ]; + buildInputs = [ fontconfig freetype glib @@ -38,8 +42,6 @@ stdenvNoCC.mkDerivation (self: { libjpeg libpng12 libz - makeWrapper - unrar xorg.libSM xorg.libX11 xorg.libXext From 285eed58c43c477449748aa54ef7dd362e6e8e1f Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 27 Feb 2025 21:45:30 +0100 Subject: [PATCH 4/4] pkgs/SPFlashTool5: update to 5.228, use spflashtools for source --- pkgs/by-name/sp/SPFlashTool5/package.nix | 27 ++++++------------------ 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/pkgs/by-name/sp/SPFlashTool5/package.nix b/pkgs/by-name/sp/SPFlashTool5/package.nix index d837743..6e155d5 100644 --- a/pkgs/by-name/sp/SPFlashTool5/package.nix +++ b/pkgs/by-name/sp/SPFlashTool5/package.nix @@ -11,28 +11,21 @@ libz, makeWrapper, stdenvNoCC, - unrar, + unzip, xorg, }: -let - rarPassword = "spflashtool.com"; -in - stdenvNoCC.mkDerivation (self: { pname = "SPFlashTool5"; - version = "5.1916"; + version = "5.2228"; src = fetchurl { - url = "https://spflashtool.com/files/SP_Flash_Tool-5.1916_Linux.rar"; - hash = "sha256-5lv/uPfUoke0IwjGuV/gTBt4kCbr95mwco3q9cjW/mE="; - curlOptsList = [ - "--referer" "https://spflashtool.com/download/" - ]; + url = "https://spflashtools.com/wp-content/uploads/SP_Flash_Tool_v5.2228_Linux.zip"; + hash = "sha256-GLEe7TQf1X/rf7xYp7jrk0KbrMfSWpk4eK+KC26Y3xA="; }; nativeBuildInputs = [ autoPatchelfHook makeWrapper - unrar + unzip ]; buildInputs = [ fontconfig @@ -47,14 +40,6 @@ stdenvNoCC.mkDerivation (self: { xorg.libXext xorg.libXrender ]; - unpackPhase = '' - runHook preUnpack - - unrar x -p${lib.escapeShellArg rarPassword} $src - cd */ - - runHook postUnpack - ''; # remove plugins that have outdated dependencies not available in nixpkgs # they are not needed to run the tool anyway prePatch = '' @@ -79,7 +64,7 @@ stdenvNoCC.mkDerivation (self: { ''; meta = { description = "Flash tool for MediaTek devices"; - homepage = "https://spflashtool.com/"; + homepage = "https://spflashtools.com/"; license = lib.licenses.unfree; maintainers = with lib.maintainers; [ amozeo ]; };