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