Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ufbt: init at 0.2.5, flipperzero-toolchain: init at 39 #381255

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4532,6 +4532,11 @@
email = "jupiter@m.rdis.dev";
name = "Scott Little";
};
CodeRadu = {
github = "CodeRadu";
githubId = 47945947;
name = "Radu";
};
codgician = {
email = "codgician@outlook.com";
github = "codgician";
Expand Down
50 changes: 50 additions & 0 deletions pkgs/by-name/fl/flipperzero-toolchain/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
libgcc,
libnsl,
libxcrypt,
}:

stdenv.mkDerivation rec {
pname = "flipperzero-toolchain";
version = "39";

src = fetchurl {
url = "https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-12.3-x86_64-linux-flipper-${version}.tar.gz";
hash = "sha256-wETFkjP2b278+FSv/i1eCdutBNaHCdUTvHYLHZiJWFM=";
};

nativeBuildInputs = [ autoPatchelfHook ];

buildInputs = [
libgcc
stdenv.cc.cc.lib # for libstdc++.so.6
libnsl
libxcrypt
];

sourceRoot = ".";

shellHook = ''
export FBT_TOOLCHAIN_PATH=$out/opt/flipperzero-toolchain
'';

installPhase = ''
mkdir -p $out/opt/flipperzero-toolchain/toolchain/x86_64-linux
cp -r gcc-arm-none-eabi-12.3-x86_64-linux-flipper/* $out/opt/flipperzero-toolchain/toolchain/x86_64-linux
ln -sf ${libnsl}/lib/libnsl.so.3 $out/opt/flipperzero-toolchain/toolchain/x86_64-linux/lib/libnsl.so.2
ln -sf ${libxcrypt}/lib/libcrypt.so.2 $out/opt/flipperzero-toolchain/toolchain/x86_64-linux/lib/libcrypt.so.1
ln -sf $out/opt/flipperzero-toolchain/toolchain/x86_64-linux $out/opt/flipperzero-toolchain/toolchain/current
'';

meta = {
description = "Toolchain for the flipperzero";
homepage = "https://github.com/flipperdevices/flipperzero-toolchain";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ CodeRadu ];
platforms = lib.platforms.linux;
};
}
37 changes: 37 additions & 0 deletions pkgs/by-name/uf/ufbt/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
setuptools-git-versioning,
flipperzero-toolchain,
}:

buildPythonPackage rec {
pname = "ufbt";
version = "0.2.5";
format = "pyproject";

src = fetchPypi {
inherit pname version;
hash = "sha256-pQI8pSn5X6ISJ2rlEIfe6je4g7PY8HhKITl1GemMvf8=";
};

propagatedBuildInputs = [
setuptools
setuptools-git-versioning
];

makeWrapperArgs = [
"--set-default FBT_TOOLCHAIN_PATH ${flipperzero-toolchain}/opt/flipperzero-toolchain"
];

meta = {
description = "Cross-platform tool for building applications for Flipper Zero";
mainProgram = "ufbt";
homepage = "https://github.com/flipperdevices/flipperzero-ufbt";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ CodeRadu ];
platforms = lib.platforms.linux;
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7469,6 +7469,10 @@ with pkgs;
};
}));

ufbt = callPackage ../by-name/uf/ufbt/package.nix {
inherit (python3Packages) buildPythonPackage setuptools setuptools-git-versioning;
};

ansible-builder = with python3Packages; toPythonApplication ansible-builder;

ansible-doctor = callPackage ../tools/admin/ansible/doctor.nix { };
Expand Down