Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / extractcode / 7z.nix
blob89a0bd110d4b13729496161fef1d7a71f7c247de
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
4 , plugincode
5 , p7zip
6 }:
8 buildPythonPackage rec {
9   pname = "extractcode-7z";
10   version = "21.5.31";
12   src = fetchFromGitHub {
13     owner = "nexB";
14     repo = "scancode-plugins";
15     rev = "v${version}";
16     sha256 = "02qinla281fc6pmg5xzsrmqnf9js76f2qcbf98zq7m2dkn70as4w";
17   };
19   sourceRoot = "${src.name}/builtins/extractcode_7z-linux";
21   propagatedBuildInputs = [
22     plugincode
23   ];
25   preBuild = ''
26     pushd src/extractcode_7z/bin
28     rm 7z 7z.so
29     ln -s ${p7zip}/bin/7z 7z
30     ln -s ${lib.getLib p7zip}/lib/p7zip/7z.so 7z.so
32     popd
33   '';
35   # no tests
36   doCheck = false;
38   pythonImportsCheck = [
39     "extractcode_7z"
40   ];
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 = [ ];
47     platforms = platforms.linux;
48   };