terragrunt: 0.72.2 -> 0.72.6 (#378621)
[NixPkgs.git] / pkgs / development / python-modules / extractcode / 7z.nix
blobbc1ae9e07ab99086488bc171a7b01427ebc507ea
2   lib,
3   fetchFromGitHub,
4   buildPythonPackage,
5   plugincode,
6   p7zip,
7 }:
9 buildPythonPackage rec {
10   pname = "extractcode-7z";
11   version = "21.5.31";
13   src = fetchFromGitHub {
14     owner = "nexB";
15     repo = "scancode-plugins";
16     rev = "v${version}";
17     sha256 = "02qinla281fc6pmg5xzsrmqnf9js76f2qcbf98zq7m2dkn70as4w";
18   };
20   sourceRoot = "${src.name}/builtins/extractcode_7z-linux";
22   propagatedBuildInputs = [ plugincode ];
24   preBuild = ''
25     pushd src/extractcode_7z/bin
27     rm 7z 7z.so
28     ln -s ${p7zip}/bin/7z 7z
29     ln -s ${lib.getLib p7zip}/lib/p7zip/7z.so 7z.so
31     popd
32   '';
34   # no tests
35   doCheck = false;
37   pythonImportsCheck = [ "extractcode_7z" ];
39   meta = with lib; {
40     description = "ScanCode Toolkit plugin to provide pre-built binary libraries and utilities and their locations";
41     homepage = "https://github.com/nexB/scancode-plugins/tree/main/builtins/extractcode_7z-linux";
42     license = with licenses; [
43       asl20
44       lgpl21
45     ];
46     maintainers = [ ];
47     platforms = platforms.linux;
48   };