From 0503d597da2abd9db3b58a30cb0276a93c74dd87 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 15 Aug 2026 22:52:52 -0300 Subject: [PATCH] bitbake-setup: init at 2.19.0 bitbake-setup is the OpenEmbedded utility that creates a BitBake build environment from a published configuration. It bundles the BitBake `bb` library, so it needs no other Python packages. Upstream publishes a wheel only. The Git repository has no build files at the 2.19.0 tag: `packaging-pypi/bitbake-setup/` came later, and it assembles the distribution with a script instead of a plain source tree. The wheel is therefore the only released source. `nix-update` cannot read the version from the `files.pythonhosted.org` wheel URL, so the update script passes a `mirror://pypi` URL instead. The tool runs `git` to fetch the configuration registry and the layers, so the wrapper adds `git` to PATH. Assisted-by: Claude Code (claude-opus-5) --- pkgs/by-name/bi/bitbake-setup/package.nix | 63 +++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 pkgs/by-name/bi/bitbake-setup/package.nix diff --git a/pkgs/by-name/bi/bitbake-setup/package.nix b/pkgs/by-name/bi/bitbake-setup/package.nix new file mode 100644 index 000000000000..d37b04d9cb41 --- /dev/null +++ b/pkgs/by-name/bi/bitbake-setup/package.nix @@ -0,0 +1,63 @@ +{ + lib, + python3Packages, + fetchPypi, + + git, + + nix-update-script, + versionCheckHook, +}: +python3Packages.buildPythonApplication (finalAttrs: { + pname = "bitbake-setup"; + version = "2.19.0"; + format = "wheel"; + + __structuredAttrs = true; + + src = fetchPypi { + pname = "bitbake_setup"; + inherit (finalAttrs) version; + format = "wheel"; + dist = "py3"; + python = "py3"; + hash = "sha256-tq53r8I02HL4mTgnIxcVf4VTYhRngYgl232/cDgLzdI="; + }; + + makeWrapperArgs = [ + "--prefix" + "PATH" + ":" + (lib.makeBinPath [ git ]) + ]; + + pythonImportsCheck = [ "bitbake_setup" ]; + + versionCheckProgramArg = "--version"; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--url" + "mirror://pypi/b/bitbake_setup/" + ]; + }; + + meta = { + description = "Command that sets up a BitBake build environment from a published configuration"; + homepage = "https://git.openembedded.org/bitbake/"; + downloadPage = "https://pypi.org/project/bitbake-setup/"; + license = with lib.licenses; [ + gpl2Only + mit + psfl + zlib + lgpl21Plus + bsd3Clear + ]; + mainProgram = "bitbake-setup"; + maintainers = with lib.maintainers; [ otavio ]; + platforms = lib.platforms.linux; + }; +})