65 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			65 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   lib,
 | |
|   python3Packages,
 | |
|   fetchFromGitHub,
 | |
|   pkg-config,
 | |
|   libjpeg_turbo,
 | |
|   exiftran ? libjpeg_turbo,
 | |
| }:
 | |
| python3Packages.buildPythonPackage {
 | |
|   pname = "sgblur";
 | |
|   version = "1.0.0";
 | |
| 
 | |
|   pyproject = true;
 | |
| 
 | |
|   src = fetchFromGitHub {
 | |
|     owner = "cquest";
 | |
|     repo = "sgblur";
 | |
|     rev = "master";
 | |
|     hash = "sha256-17wpif2sa021kaa1pbkry4l1967la1qd7knhngvxblrvd7jqqz4y=";
 | |
|   };
 | |
| 
 | |
|   nativeBuildInputs = [
 | |
|     pkg-config
 | |
|   ];
 | |
| 
 | |
|   buildInputs = [
 | |
|     libjpeg_turbo
 | |
|     exiftran
 | |
|   ];
 | |
| 
 | |
|   build-system = with python3Packages; [
 | |
|     setuptools
 | |
|     wheel
 | |
|   ];
 | |
| 
 | |
|   dependencies = with python3Packages; [
 | |
|     # Core dependencies from pyproject.toml
 | |
|     ultralytics
 | |
|     # pyturbojpeg  # May need special handling
 | |
|     pillow
 | |
|     # uuid  # Built into Python
 | |
|     # exifread
 | |
|     python-multipart
 | |
|     fastapi
 | |
|     uvicorn
 | |
|     requests
 | |
|     # piexif
 | |
|     pydantic-settings
 | |
|     pydantic
 | |
|   ];
 | |
| 
 | |
|   # Skip tests as they may require GPU or specific setup
 | |
|   doCheck = false;
 | |
| 
 | |
|   # The package may have import issues due to system dependencies
 | |
|   pythonImportsCheck = [];
 | |
| 
 | |
|   meta = with lib; {
 | |
|     description = "Panoramax Speedy Gonzales Blurring Algorithm - AI-powered face and license plate blurring API";
 | |
|     homepage = "https://github.com/cquest/sgblur";
 | |
|     license = licenses.mit;
 | |
|     maintainers = [];
 | |
|     platforms = platforms.unix;
 | |
|   };
 | |
| }
 |