push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
{
lib,
fetchFromGitHub,
buildPythonPackage,
plugincode,
p7zip,
}:
buildPythonPackage rec {
pname = "extractcode-7z";
version = "21.5.31";
format = "setuptools";
src = fetchFromGitHub {
owner = "aboutcode-org";
repo = "scancode-plugins";
tag = "v${version}";
hash = "sha256-nGgFjp1N1IM/Sm4xLJw5WiZncc369/LqNcwFJBS1EQs=";
};
sourceRoot = "${src.name}/builtins/extractcode_7z-linux";
propagatedBuildInputs = [ plugincode ];
preBuild = ''
pushd src/extractcode_7z/bin
rm 7z 7z.so
ln -s ${p7zip}/bin/7z 7z
ln -s ${lib.getLib p7zip}/lib/p7zip/7z.so 7z.so
popd
'';
# no tests
doCheck = false;
pythonImportsCheck = [ "extractcode_7z" ];
meta = {
description = "ScanCode Toolkit plugin to provide pre-built binary libraries and utilities and their locations";
homepage = "https://github.com/aboutcode-org/scancode-plugins/tree/main/builtins/extractcode_7z-linux";
license = with lib.licenses; [
asl20
lgpl21
];
maintainers = [ ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,91 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools-scm,
# dependencies
extractcode-7z,
extractcode-libarchive,
patch,
six,
typecode,
# tests
pytest-xdist,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "extractcode";
version = "31.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "aboutcode-org";
repo = "extractcode";
tag = "v${version}";
hash = "sha256-mPHGe/pMaOnIykDd4AjGcvh/T4UrbaGxrSVGhchqYFM=";
};
postPatch = ''
# PEP440 support was removed in newer setuptools, https://github.com/nexB/extractcode/pull/46
substituteInPlace setup.cfg \
--replace-fail ">=3.6.*" ">=3.6"
'';
dontConfigure = true;
build-system = [ setuptools-scm ];
dependencies = [
extractcode-7z
extractcode-libarchive
patch
six
typecode
];
nativeCheckInputs = [
pytest-xdist
pytestCheckHook
];
disabledTestPaths = [
# CLI test tests the CLI which we can't do until after install
"tests/test_extractcode_cli.py"
];
disabledTests = [
# test_uncompress_* wants to use a binary to extract instead of the provided library
"test_uncompress_lz4_basic"
"test_extract_tarlz4_basic"
"test_extract_rar_with_trailing_data"
# Tries to parse /boot/vmlinuz-*, which is not available in the nix sandbox
"test_can_extract_qcow2_vm_image_as_tarball"
"test_can_extract_qcow2_vm_image_not_as_tarball"
"test_can_listfs_from_qcow2_image"
"test_get_extractor_qcow2"
# WARNING patch:patch.py:450 inconsistent line ends in patch hunks
"test_patch_info_patch_patches_windows_plugin_explorer_patch"
# AssertionError: assert [['linux-2.6...._end;', ...]]] == [['linux-2.6...._end;', ...]]]
"test_patch_info_patch_patches_misc_linux_st710x_patches_motorola_rootdisk_c_patch"
# extractcode.libarchive2.ArchiveErrorRetryable: Damaged tar archive
"test_extract_python_testtar_tar_archive_with_special_files"
# AssertionError: [<function extract at 0x7ffff493dd00>] == [] for archive/rar/basic.rar
"test_get_extractors_2"
];
pythonImportsCheck = [ "extractcode" ];
meta = {
description = "Universal archive extractor using z7zip, libarchive, other libraries and the Python standard library";
homepage = "https://github.com/aboutcode-org/extractcode";
changelog = "https://github.com/aboutcode-org/extractcode/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = [ ];
mainProgram = "extractcode";
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
fetchFromGitHub,
buildPythonPackage,
libarchive,
libb2,
bzip2,
expat,
lz4,
xz,
zlib,
zstd,
plugincode,
}:
buildPythonPackage rec {
pname = "extractcode-libarchive";
version = "21.5.31";
format = "setuptools";
src = fetchFromGitHub {
owner = "aboutcode-org";
repo = "scancode-plugins";
tag = "v${version}";
hash = "sha256-nGgFjp1N1IM/Sm4xLJw5WiZncc369/LqNcwFJBS1EQs=";
};
sourceRoot = "${src.name}/builtins/extractcode_libarchive-linux";
preBuild = ''
pushd src/extractcode_libarchive/lib
rm *.so *.so.*
ln -s ${lib.getLib libarchive}/lib/libarchive.so libarchive.so
ln -s ${lib.getLib libb2}/lib/libb2.so libb2-la3511.so.1
ln -s ${lib.getLib bzip2}/lib/libbz2.so libbz2-la3511.so.1.0
ln -s ${lib.getLib expat}/lib/libexpat.so libexpat-la3511.so.1
ln -s ${lib.getLib lz4}/lib/liblz4.so liblz4-la3511.so.1
ln -s ${lib.getLib xz}/lib/liblzma.so liblzma-la3511.so.5
ln -s ${lib.getLib zlib}/lib/libz.so libz-la3511.so.1
ln -s ${lib.getLib zstd}/lib/libzstd.so libzstd-la3511.so.1
popd
'';
propagatedBuildInputs = [ plugincode ];
# no tests
doCheck = false;
pythonImportsCheck = [ "extractcode_libarchive" ];
meta = {
description = "ScanCode Toolkit plugin to provide pre-built binary libraries and utilities and their locations";
homepage = "https://github.com/aboutcode-org/scancode-plugins/tree/main/builtins/extractcode_libarchive-linux";
license = with lib.licenses; [
asl20
bsd2
];
maintainers = [ ];
platforms = lib.platforms.linux;
};
}