python3Packages.sebaubuntu-libs: init at 2.0.0

Signed-off-by: David Wronek <david.wronek@mainlining.org>
This commit is contained in:
David Wronek
2026-04-06 21:22:53 +02:00
parent 1d7a8197a6
commit 64620c3bf6
2 changed files with 70 additions and 0 deletions
@@ -0,0 +1,68 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
nix-update-script,
android-image-kitchen,
gitpython,
poetry-core,
pyelftools,
requests,
}:
buildPythonPackage (finalAttrs: {
pname = "sebaubuntu-libs";
version = "2.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "sebaubuntu-python";
repo = "sebaubuntu_libs";
tag = "v${finalAttrs.version}";
hash = "sha256-LV7Me+GmgOvDh0XGoLaftCKtP/fnB5xVqb8nArOMIys=";
};
build-system = [
poetry-core
];
dependencies = [
gitpython
pyelftools
requests
];
postPatch = ''
# Patch libaik to use AIK from nixpkgs
substituteInPlace sebaubuntu_libs/libaik/__init__.py \
--replace-fail \
"Repo.clone_from(AIK_REPO, self.path)" "" \
--replace-fail \
"unpackimg.sh" "${lib.getExe' android-image-kitchen "aik-unpackimg"}" \
--replace-fail \
"repack.sh" "${lib.getExe' android-image-kitchen "aik-repackimg"}" \
--replace-fail \
"cleanup.sh" "${lib.getExe' android-image-kitchen "aik-cleanup"}" \
--replace-fail \
'command = [self.path / script, "--nosudo", *args]' \
'command = [script, "--nosudo", *args]' \
--replace-fail \
'return check_output(command, stderr=STDOUT, universal_newlines=True, encoding="utf-8")' \
'return check_output(command, stderr=STDOUT, universal_newlines=True, encoding="utf-8",
cwd=self.path)'
'';
# Module has no tests
doCheck = false;
pythonImportsCheck = [ "sebaubuntu_libs" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "SebaUbuntu's shared libs";
homepage = "https://github.com/sebaubuntu-python/sebaubuntu_libs";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ungeskriptet ];
};
})
+2
View File
@@ -17393,6 +17393,8 @@ self: super: with self; {
seatconnect = callPackage ../development/python-modules/seatconnect { };
sebaubuntu-libs = callPackage ../development/python-modules/sebaubuntu-libs { };
seccomp = callPackage ../development/python-modules/seccomp { };
secp256k1 = callPackage ../development/python-modules/secp256k1 { inherit (pkgs) secp256k1; };