diff --git a/nix/pkgs/flipperzero-firmware/default.nix b/nix/pkgs/flipperzero-firmware/default.nix index 7e23009710..cb3ffd1f94 100644 --- a/nix/pkgs/flipperzero-firmware/default.nix +++ b/nix/pkgs/flipperzero-firmware/default.nix @@ -41,24 +41,24 @@ pkgs.stdenvNoCC.mkDerivation rec { pname = "flipper-firmware"; version = "0.65.3-0827-RMv2"; - src = (pkgs.fetchgit { + src = pkgs.fetchgit { url = "https://github.com/RogueMaster/flipperzero-firmware-wPlugins.git"; rev = version; fetchSubmodules = true; - leaveDotGit = true; - sha256 = "1ch9fwkl00db3m57iz5xykk2zkd9cvg4h1msspni7ghvqnjmiy9v"; - }).overrideAttrs (_: { - NIX_PREFETCH_GIT_CHECKOUT_HOOK = '' - find "$dir" -mindepth 2 -name .git -print0 | xargs -0 rm -rf - ''; - }); + sha256 = "09hmbvv5fgn4y2cz95kcq5lm1rkj776xv06haqhah0s823wk623m"; + }; patches = [ ./fbt_assets_protobuf_version_from_changelog.patch + ./no_version_git.patch ]; nativeBuildInputs = deps; + WORKFLOW_BRANCH_OR_TAG = version; + DIST_SUFFIX = ""; + CUSTOM_FLIPPER_NAME = ""; + FBT_NOENV = 1; FBT_NO_SYNC = 1; buildPhase = '' @@ -67,6 +67,7 @@ pkgs.stdenvNoCC.mkDerivation rec { mkdir -p $NIX_BUILD_TOP/bin ln -s $(command -v arm-none-eabi-gcc) $NIX_BUILD_TOP/bin/arm-none-eabi-cc export PATH=$NIX_BUILD_TOP/bin:$PATH + export WORKFLOW_BRANCH_OR_TAG DIST_SUFFIX CUSTOM_FLIPPER_NAME ./fbt -j$NIX_BUILD_CORES --with-updater COMPACT=1 DEBUG=0 updater_package diff --git a/nix/pkgs/flipperzero-firmware/no_version_git.patch b/nix/pkgs/flipperzero-firmware/no_version_git.patch new file mode 100644 index 0000000000..da5932cd43 --- /dev/null +++ b/nix/pkgs/flipperzero-firmware/no_version_git.patch @@ -0,0 +1,19 @@ +diff --git a/scripts/version.py b/scripts/version.py +index 3c04b7e1..cd4ebe47 100644 +--- a/scripts/version.py ++++ b/scripts/version.py +@@ -61,13 +61,7 @@ class GitVersion: + } + + def _exec_git(self, args): +- cmd = ["git"] +- cmd.extend(args.split(" ")) +- return ( +- subprocess.check_output(cmd, cwd=self.source_dir, stderr=subprocess.STDOUT) +- .strip() +- .decode() +- ) ++ return '' + + + class Main(App):