8 buildPythonPackage rec {
9 pname = "typecode-libmagic";
12 src = fetchFromGitHub {
14 repo = "scancode-plugins";
16 sha256 = "xnUGDMS34iMVMGo/nZwRarGzzbj3X4Rt+YHvvKpmy6A=";
19 sourceRoot = "${src.name}/builtins/typecode_libmagic-linux";
21 propagatedBuildInputs = [
26 pushd src/typecode_libmagic
28 rm data/magic.mgc lib/libmagic.so lib/libz-lm539.so.1
29 ln -s ${file}/share/misc/magic.mgc data/magic.mgc
30 ln -s ${file}/lib/libmagic.so lib/libmagic.so
31 ln -s ${zlib}/lib/libz.so lib/libz-lm539.so.1
39 pythonImportsCheck = [
44 description = "A ScanCode Toolkit plugin to provide pre-built binary libraries and utilities and their locations";
45 homepage = "https://github.com/nexB/scancode-plugins/tree/main/builtins/typecode_libmagic-linux";
46 license = licenses.asl20;
48 platforms = platforms.linux;