Compare commits

..

No commits in common. "285eed58c43c477449748aa54ef7dd362e6e8e1f" and "e4d8bfada58057123ac11e3848cf363bdcc7c9a9" have entirely different histories.

3 changed files with 32 additions and 16 deletions

View file

@ -4,15 +4,15 @@
sha256 = "1rq8mrlmbzpcbv9ys0x88alw30ks70jlmvnfr2j8v830yy5wvw7h";
};
nixpkgs = {
revision = "5d7db4668d7a0c6cc5fc8cf6ef33b008b2b1ed8b";
sha256 = "1xxfs0jk98236v3h7gwhhai7j33sri0phvgp5ng24x4lfvznwy71";
revision = "0b73e36b1962620a8ac551a37229dd8662dac5c8";
sha256 = "15avzb7r8iflfsl4glcvgqk1bn4fy9xr7fq7cjw8lg1vsg6qndf2";
};
nixpkgs-unstable = {
revision = "5135c59491985879812717f4c9fea69604e7f26f";
sha256 = "09qy7zv80bkd9ighsw0bdxjq70dw3qjnyvg7il1fycrsgs5x1gan";
revision = "2ff53fe64443980e139eaa286017f53f88336dd0";
sha256 = "0ms5nbr2vmvhbr531bxvyi10nz9iwh5cry12pl416gyvf0mxixpv";
};
cosmic-modules = {
revision = "c5a9b54c1ed6586e60ed6acd2178704ce1824c19";
sha256 = "1wagkh8xkpq06nzwfy7jpjgr2wnigk15871jcvap3k3p4is3ykik";
revision = "51f16d9cd5ab24afa8b940d0e5c83965c46ef430";
sha256 = "1xvp160gd46bx0fhbyls75dmsq05qhcxkd2mwy3irzg8di1986ny";
};
}

View file

@ -13,7 +13,10 @@ systems = [
];
# (system -> x) -> { [system] := x }
forEachSystem = lib.genAttrs systems;
forEachSystem = x: lib.pipe systems [
(builtins.map (system: { name = system; value = x system; }))
builtins.listToAttrs
];
self = {
inherit inputs lib self;

View file

@ -11,23 +11,26 @@
libz,
makeWrapper,
stdenvNoCC,
unzip,
unrar,
xorg,
}:
let
rarPassword = "spflashtool.com";
in
stdenvNoCC.mkDerivation (self: {
pname = "SPFlashTool5";
version = "5.2228";
version = "5.1916";
src = fetchurl {
url = "https://spflashtools.com/wp-content/uploads/SP_Flash_Tool_v5.2228_Linux.zip";
hash = "sha256-GLEe7TQf1X/rf7xYp7jrk0KbrMfSWpk4eK+KC26Y3xA=";
url = "https://spflashtool.com/files/SP_Flash_Tool-5.1916_Linux.rar";
hash = "sha256-5lv/uPfUoke0IwjGuV/gTBt4kCbr95mwco3q9cjW/mE=";
curlOptsList = [
"--referer" "https://spflashtool.com/download/"
];
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
unzip
];
buildInputs = [
fontconfig
freetype
glib
@ -35,11 +38,21 @@ stdenvNoCC.mkDerivation (self: {
libjpeg
libpng12
libz
makeWrapper
unrar
xorg.libSM
xorg.libX11
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 = ''
@ -64,7 +77,7 @@ stdenvNoCC.mkDerivation (self: {
'';
meta = {
description = "Flash tool for MediaTek devices";
homepage = "https://spflashtools.com/";
homepage = "https://spflashtool.com/";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ amozeo ];
};