refactor: made pkgs dendrites
This commit is contained in:
parent
88041e86bd
commit
df8dd110ad
54 changed files with 1184 additions and 1058 deletions
75
modules/nixos/pkgs/sgblur.nix
Normal file
75
modules/nixos/pkgs/sgblur.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{...}: let
|
||||
package = {
|
||||
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;
|
||||
};
|
||||
};
|
||||
in {
|
||||
flake.commonModules.sgblur = {pkgs, ...}: {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
sgblur = pkgs.python3.pkgs.callPackage package {};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue