mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 15:43:00 +00:00
Merge pull request #318929 from TomaSajt/materialyoucolor
python312Packages.materialyoucolor: init at 2.0.9
This commit is contained in:
commit
c94583e917
59
pkgs/development/python-modules/materialyoucolor/default.nix
Normal file
59
pkgs/development/python-modules/materialyoucolor/default.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchurl,
|
||||
fetchPypi,
|
||||
setuptools,
|
||||
pybind11,
|
||||
requests,
|
||||
rich,
|
||||
pillow,
|
||||
}:
|
||||
|
||||
let
|
||||
test-image = fetchurl {
|
||||
name = "test-image.jpg";
|
||||
url = "https://unsplash.com/photos/u9tAl8WR3DI/download";
|
||||
hash = "sha256-shGNdgOOydgGBtl/JCbTJ0AYgl+2xWvCgHBL+bEoTaE=";
|
||||
};
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "materialyoucolor";
|
||||
version = "2.0.9";
|
||||
pyproject = true;
|
||||
|
||||
# PyPI sources contain additional vendored sources
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-J35//h3tWn20f5ej6OXaw4NKnxung9q7m0E4Zf9PUw4=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
pybind11
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
requests
|
||||
rich
|
||||
pillow
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
python tests/test_all.py ${test-image} 1
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"materialyoucolor"
|
||||
"materialyoucolor.quantize" # ext
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Material You color generation algorithms in python";
|
||||
homepage = "https://github.com/T-Dynamos/materialyoucolor-python";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ tomasajt ];
|
||||
};
|
||||
}
|
@ -7352,6 +7352,8 @@ self: super: with self; {
|
||||
|
||||
materialx = callPackage ../development/python-modules/materialx { };
|
||||
|
||||
materialyoucolor = callPackage ../development/python-modules/materialyoucolor { };
|
||||
|
||||
matchpy = callPackage ../development/python-modules/matchpy { };
|
||||
|
||||
mathlibtools = callPackage ../development/python-modules/mathlibtools { };
|
||||
|
Loading…
Reference in New Issue
Block a user