2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
libarchive,
|
|
|
|
libb2,
|
|
|
|
bzip2,
|
|
|
|
expat,
|
|
|
|
lz4,
|
|
|
|
xz,
|
|
|
|
zlib,
|
|
|
|
zstd,
|
|
|
|
plugincode,
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "extractcode-libarchive";
|
2021-07-03 03:11:41 +00:00
|
|
|
version = "21.5.31";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nexB";
|
|
|
|
repo = "scancode-plugins";
|
|
|
|
rev = "v${version}";
|
2021-07-03 03:11:41 +00:00
|
|
|
sha256 = "02qinla281fc6pmg5xzsrmqnf9js76f2qcbf98zq7m2dkn70as4w";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/builtins/extractcode_libarchive-linux";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
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
|
2021-06-28 23:13:55 +00:00
|
|
|
ln -s ${lib.getLib xz}/lib/liblzma.so liblzma-la3511.so.5
|
2021-04-25 03:57:28 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ plugincode ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "extractcode_libarchive" ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A ScanCode Toolkit plugin to provide pre-built binary libraries and utilities and their locations";
|
|
|
|
homepage = "https://github.com/nexB/scancode-plugins/tree/main/builtins/extractcode_libarchive-linux";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
asl20
|
|
|
|
bsd2
|
|
|
|
];
|
2023-03-24 00:07:29 +00:00
|
|
|
maintainers = [ ];
|
2021-04-25 03:57:28 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|