nix/pkgs/flipperzero-firmware: fine, no .git for you
This commit is contained in:
parent
b842370266
commit
bf797e9ed5
2 changed files with 28 additions and 8 deletions
|
@ -41,24 +41,24 @@ pkgs.stdenvNoCC.mkDerivation rec {
|
||||||
pname = "flipper-firmware";
|
pname = "flipper-firmware";
|
||||||
version = "0.65.3-0827-RMv2";
|
version = "0.65.3-0827-RMv2";
|
||||||
|
|
||||||
src = (pkgs.fetchgit {
|
src = pkgs.fetchgit {
|
||||||
url = "https://github.com/RogueMaster/flipperzero-firmware-wPlugins.git";
|
url = "https://github.com/RogueMaster/flipperzero-firmware-wPlugins.git";
|
||||||
rev = version;
|
rev = version;
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
leaveDotGit = true;
|
sha256 = "09hmbvv5fgn4y2cz95kcq5lm1rkj776xv06haqhah0s823wk623m";
|
||||||
sha256 = "1ch9fwkl00db3m57iz5xykk2zkd9cvg4h1msspni7ghvqnjmiy9v";
|
};
|
||||||
}).overrideAttrs (_: {
|
|
||||||
NIX_PREFETCH_GIT_CHECKOUT_HOOK = ''
|
|
||||||
find "$dir" -mindepth 2 -name .git -print0 | xargs -0 rm -rf
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./fbt_assets_protobuf_version_from_changelog.patch
|
./fbt_assets_protobuf_version_from_changelog.patch
|
||||||
|
./no_version_git.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = deps;
|
nativeBuildInputs = deps;
|
||||||
|
|
||||||
|
WORKFLOW_BRANCH_OR_TAG = version;
|
||||||
|
DIST_SUFFIX = "";
|
||||||
|
CUSTOM_FLIPPER_NAME = "";
|
||||||
|
|
||||||
FBT_NOENV = 1;
|
FBT_NOENV = 1;
|
||||||
FBT_NO_SYNC = 1;
|
FBT_NO_SYNC = 1;
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
@ -67,6 +67,7 @@ pkgs.stdenvNoCC.mkDerivation rec {
|
||||||
mkdir -p $NIX_BUILD_TOP/bin
|
mkdir -p $NIX_BUILD_TOP/bin
|
||||||
ln -s $(command -v arm-none-eabi-gcc) $NIX_BUILD_TOP/bin/arm-none-eabi-cc
|
ln -s $(command -v arm-none-eabi-gcc) $NIX_BUILD_TOP/bin/arm-none-eabi-cc
|
||||||
export PATH=$NIX_BUILD_TOP/bin:$PATH
|
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
|
./fbt -j$NIX_BUILD_CORES --with-updater COMPACT=1 DEBUG=0 updater_package
|
||||||
|
|
||||||
|
|
19
nix/pkgs/flipperzero-firmware/no_version_git.patch
Normal file
19
nix/pkgs/flipperzero-firmware/no_version_git.patch
Normal file
|
@ -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):
|
Loading…
Reference in a new issue