From 5166e2fd4e6313ed62957b839f431ec00d4fa287 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 4 Dec 2022 06:40:03 +0000 Subject: [PATCH] flipperzero-firmware: 0.69.2-1020-RM -> RM11250310-0.71.2-0e622a2 --- .../0001-simply-do-not-run-git.patch | 6 ++--- ..._ver_generator-use-changelog-not-git.patch | 18 +++++++-------- .../0003-scripts-fbt-version-no-git.patch | 4 ++-- ...t-disable-strict_timestamps-allow-FS.patch | 22 +++++++++---------- nix/pkgs/flipperzero-firmware/default.nix | 14 ++++++++++-- 5 files changed, 36 insertions(+), 28 deletions(-) diff --git a/nix/pkgs/flipperzero-firmware/0001-simply-do-not-run-git.patch b/nix/pkgs/flipperzero-firmware/0001-simply-do-not-run-git.patch index 7d72f74aac..add22adf52 100644 --- a/nix/pkgs/flipperzero-firmware/0001-simply-do-not-run-git.patch +++ b/nix/pkgs/flipperzero-firmware/0001-simply-do-not-run-git.patch @@ -1,4 +1,4 @@ -From 76176935f5f9bf6347658c64d2c6f30711830b80 Mon Sep 17 00:00:00 2001 +From a45303be72a307e04379e989f8d9418c0bc2be0b Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 22 Oct 2022 19:33:07 +0100 Subject: [PATCH 1/4] simply do not run git @@ -8,7 +8,7 @@ Subject: [PATCH 1/4] simply do not run git 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/version.py b/scripts/version.py -index 12a684391..1c8411ca9 100644 +index f4dd127f5..b0a27f705 100644 --- a/scripts/version.py +++ b/scripts/version.py @@ -61,13 +61,7 @@ class GitVersion: @@ -27,5 +27,5 @@ index 12a684391..1c8411ca9 100644 class Main(App): -- -2.37.2 +2.38.1 diff --git a/nix/pkgs/flipperzero-firmware/0002-proto_ver_generator-use-changelog-not-git.patch b/nix/pkgs/flipperzero-firmware/0002-proto_ver_generator-use-changelog-not-git.patch index a47b57c5c6..9bdf663b12 100644 --- a/nix/pkgs/flipperzero-firmware/0002-proto_ver_generator-use-changelog-not-git.patch +++ b/nix/pkgs/flipperzero-firmware/0002-proto_ver_generator-use-changelog-not-git.patch @@ -1,17 +1,17 @@ -From e7e503880ef3d74eab320a0f9f9aa639947b1b82 Mon Sep 17 00:00:00 2001 +From 0053661d07e31fa0caa85d83a030c6e1f2f52625 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 22 Oct 2022 19:35:00 +0100 Subject: [PATCH 2/4] proto_ver_generator: use changelog, not git --- - scripts/fbt_tools/fbt_assets.py | 30 ++++++++++-------------------- - 1 file changed, 10 insertions(+), 20 deletions(-) + scripts/fbt_tools/fbt_assets.py | 28 ++++++++++------------------ + 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/scripts/fbt_tools/fbt_assets.py b/scripts/fbt_tools/fbt_assets.py -index f058d15f9..59854739f 100644 +index e17487358..6350ffcb7 100644 --- a/scripts/fbt_tools/fbt_assets.py +++ b/scripts/fbt_tools/fbt_assets.py -@@ -67,28 +67,18 @@ def _invoke_git(args, source_dir): +@@ -75,26 +75,18 @@ def _invoke_git(args, source_dir): def proto_ver_generator(target, source, env): @@ -33,7 +33,7 @@ index f058d15f9..59854739f 100644 - ) - except (subprocess.CalledProcessError, EnvironmentError) as e: - # Not great, not terrible -- print("Git: fetch failed") +- print(fg.boldred("Git: fetch failed")) - - try: - git_describe = _invoke_git( @@ -41,15 +41,13 @@ index f058d15f9..59854739f 100644 - source_dir=src_dir, - ) - except (subprocess.CalledProcessError, EnvironmentError) as e: -- print("Git: describe failed") -- Exit("git error") +- raise SConsEnvironmentError("Git: describe failed") -- # print("describe=", git_describe) - git_major, git_minor = git_describe.split(".") + git_major, git_minor = version.split(".") version_file_data = ( "#pragma once", f"#define PROTOBUF_MAJOR_VERSION {git_major}", -- -2.37.2 +2.38.1 diff --git a/nix/pkgs/flipperzero-firmware/0003-scripts-fbt-version-no-git.patch b/nix/pkgs/flipperzero-firmware/0003-scripts-fbt-version-no-git.patch index c6dfcddb4c..0a7a3a85da 100644 --- a/nix/pkgs/flipperzero-firmware/0003-scripts-fbt-version-no-git.patch +++ b/nix/pkgs/flipperzero-firmware/0003-scripts-fbt-version-no-git.patch @@ -1,4 +1,4 @@ -From 2dc46cf7bab7c8fac5b7959e198a90a8b89b2c9b Mon Sep 17 00:00:00 2001 +From 744d6356f5e8f91c944bb645677b4514f2f17e3d Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 22 Oct 2022 19:40:33 +0100 Subject: [PATCH 3/4] scripts/fbt/version: no git @@ -46,5 +46,5 @@ index e7fe2edaf..c07bc2915 100644 except Exception as e: print("Failed to check for git changes", e) -- -2.37.2 +2.38.1 diff --git a/nix/pkgs/flipperzero-firmware/0004-scripts-sconsdist-disable-strict_timestamps-allow-FS.patch b/nix/pkgs/flipperzero-firmware/0004-scripts-sconsdist-disable-strict_timestamps-allow-FS.patch index 3c796b1b02..7b350f1eb2 100644 --- a/nix/pkgs/flipperzero-firmware/0004-scripts-sconsdist-disable-strict_timestamps-allow-FS.patch +++ b/nix/pkgs/flipperzero-firmware/0004-scripts-sconsdist-disable-strict_timestamps-allow-FS.patch @@ -1,4 +1,4 @@ -From 67ea1d3dc32a3a9d4191a325b33a9e8d9f4f934e Mon Sep 17 00:00:00 2001 +From d7ca7d6617950f13371aeabf179060a82cfccc88 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 22 Oct 2022 19:50:27 +0100 Subject: [PATCH 4/4] scripts/sconsdist: disable strict_timestamps - allow FS @@ -9,17 +9,17 @@ Subject: [PATCH 4/4] scripts/sconsdist: disable strict_timestamps - allow FS 1 file changed, 1 insertion(+) diff --git a/scripts/sconsdist.py b/scripts/sconsdist.py -index 5f38ec980..270335e1f 100644 +index 0fa120d87..3e950e681 100644 --- a/scripts/sconsdist.py +++ b/scripts/sconsdist.py -@@ -77,6 +77,7 @@ class Main(App): - self.get_dist_filepath(self.get_project_filename(project, "zip")), - "w", - zipfile.ZIP_DEFLATED, -+ strict_timestamps=False, - ) as zf: - for root, dirs, files in walk(sdk_folder): - for file in files: +@@ -82,6 +82,7 @@ class Main(App): + self.get_dist_file_path(self.get_dist_file_name(foldertype, "zip")), + "w", + zipfile.ZIP_DEFLATED, ++ strict_timestamps=False, + ) as zf: + for root, _, files in walk(sdk_folder): + for file in files: -- -2.37.2 +2.38.1 diff --git a/nix/pkgs/flipperzero-firmware/default.nix b/nix/pkgs/flipperzero-firmware/default.nix index a582817611..d037c3dc50 100644 --- a/nix/pkgs/flipperzero-firmware/default.nix +++ b/nix/pkgs/flipperzero-firmware/default.nix @@ -18,6 +18,13 @@ let cython ]; }; + scons = pkgs.scons.overridePythonAttrs (_: rec { + version = "4.4.0"; + src = pkgs.fetchurl { + url = "mirror://sourceforge/scons/scons/${version}/SCons-${version}.tar.gz"; + sha256 = "0pv836q2j37w29hg5w5d7ssjfglv9kq5yd0v1vm1cj4j78qb4hrx"; + }; + }); python-with-deps = pkgs.python3.withPackages (pm: with pm; [ pillow (heatshrink2 pm) @@ -26,6 +33,9 @@ let pyserial grpcio grpcio-tools + (pm.toPythonModule scons) + ansi + colorlog ]); deps = with pkgs; [ gcc-arm-embedded-10 @@ -39,13 +49,13 @@ let in pkgs.stdenvNoCC.mkDerivation rec { pname = "flipper-firmware"; - version = "0.69.2-1020-RM"; + version = "RM11250310-0.71.2-0e622a2"; src = pkgs.fetchgit { url = "https://github.com/RogueMaster/flipperzero-firmware-wPlugins.git"; rev = version; fetchSubmodules = true; - sha256 = "05xink9rq3np1d2qdynxxbabcc7vbkr8im4hwx6dbk8zwlnmfyb1"; + sha256 = "1hfrn8slqdig6mj4arvxa5hzvcrfw4yqp6pdr51gm4m99syg4vzp"; }; patches = [