2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pytest
|
|
|
|
, Wand
|
|
|
|
, webob
|
|
|
|
, sqlalchemy
|
|
|
|
, isPyPy
|
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "SQLAlchemy-ImageAttach";
|
|
|
|
version = "1.0.0";
|
|
|
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
repo = "sqlalchemy-imageattach";
|
|
|
|
owner = "dahlia";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0ba97pn5dh00qvxyjbr0mr3pilxqw5kb3a6jd4wwbsfcv6nngqig";
|
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest Wand.imagemagick webob ];
|
|
|
|
propagatedBuildInputs = [ sqlalchemy Wand ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
cd tests
|
|
|
|
export MAGICK_HOME="${pkgs.imagemagick.dev}"
|
|
|
|
export PYTHONPATH=$PYTHONPATH:../
|
|
|
|
py.test
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = !isPyPy; # failures due to sqla version mismatch
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/dahlia/sqlalchemy-imageattach";
|
|
|
|
description = "SQLAlchemy extension for attaching images to entity objects";
|
|
|
|
license = licenses.mit;
|
2021-06-28 23:13:55 +00:00
|
|
|
broken = true; # Incompatible with sqlalchemy>=1.4 (https://github.com/dahlia/sqlalchemy-imageattach/issues/47)
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|