1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, plugincode
5, p7zip
6}:
7buildPythonPackage rec {
8 pname = "extractcode-7z";
9 version = "21.4.4";
10
11 src = fetchFromGitHub {
12 owner = "nexB";
13 repo = "scancode-plugins";
14 rev = "v${version}";
15 sha256 = "xnUGDMS34iMVMGo/nZwRarGzzbj3X4Rt+YHvvKpmy6A=";
16 };
17
18 sourceRoot = "source/builtins/extractcode_7z-linux";
19
20 propagatedBuildInputs = [
21 plugincode
22 ];
23
24 preBuild = ''
25 pushd src/extractcode_7z/bin
26
27 rm 7z 7z.so
28 ln -s ${p7zip}/bin/7z 7z
29 ln -s ${p7zip}/lib/p7zip/7z.so 7z.so
30
31 popd
32 '';
33
34 # no tests
35 doCheck = false;
36
37 pythonImportsCheck = [
38 "extractcode_7z"
39 ];
40
41 meta = with lib; {
42 description = "A ScanCode Toolkit plugin to provide pre-built binary libraries and utilities and their locations";
43 homepage = "https://github.com/nexB/scancode-plugins/tree/main/builtins/extractcode_7z-linux";
44 license = with licenses; [ asl20 lgpl21 ];
45 maintainers = teams.determinatesystems.members;
46 platforms = platforms.linux;
47 };
48}