at 25.11-pre 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 click, 5 fetchPypi, 6 magika, 7 numpy, 8 onnxruntime, 9 hatchling, 10 python-dotenv, 11 pythonOlder, 12 stdenv, 13 tabulate, 14 testers, 15 tqdm, 16}: 17 18buildPythonPackage rec { 19 pname = "magika"; 20 version = "0.6.1"; 21 pyproject = true; 22 disabled = pythonOlder "3.9"; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-490ixzk2Ywsc150PQS1tmlPcmbpeNwmxrFP1a8mY5jU="; 27 }; 28 29 nativeBuildInputs = [ hatchling ]; 30 31 propagatedBuildInputs = [ 32 click 33 numpy 34 onnxruntime 35 python-dotenv 36 tabulate 37 tqdm 38 ]; 39 40 pythonImportsCheck = [ "magika" ]; 41 42 passthru.tests.version = testers.testVersion { package = magika; }; 43 44 meta = with lib; { 45 description = "Magika: Detect file content types with deep learning"; 46 homepage = "https://github.com/google/magika"; 47 license = licenses.asl20; 48 maintainers = with maintainers; [ mihaimaruseac ]; 49 mainProgram = "magika"; 50 # Currently, disabling on AArch64 as it onnx runtime crashes on ofborg 51 broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux; 52 }; 53}