forked from jan-leila/nix-config
		
	feat: created sgblur package
This commit is contained in:
		
							parent
							
								
									1d0f51c70a
								
							
						
					
					
						commit
						c0579f55dc
					
				
					 2 changed files with 68 additions and 0 deletions
				
			
		
							
								
								
									
										65
									
								
								modules/common-modules/pkgs/sgblur.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								modules/common-modules/pkgs/sgblur.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,65 @@ | |||
| { | ||||
|   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; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue