Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv 2, buildPythonPackage 3, fetchFromGitHub 4, pytest 5, Wand 6, webob 7, sqlalchemy 8, isPyPy 9, pkgs 10}: 11 12buildPythonPackage rec { 13 pname = "SQLAlchemy-ImageAttach"; 14 version = "1.0.0"; 15 16 src = pkgs.fetchFromGitHub { 17 repo = "sqlalchemy-imageattach"; 18 owner = "dahlia"; 19 rev = "${version}"; 20 sha256 = "0ba97pn5dh00qvxyjbr0mr3pilxqw5kb3a6jd4wwbsfcv6nngqig"; 21 }; 22 23 checkInputs = [ pytest Wand.imagemagick webob ]; 24 propagatedBuildInputs = [ sqlalchemy Wand ]; 25 26 checkPhase = '' 27 cd tests 28 export MAGICK_HOME="${pkgs.imagemagick.dev}" 29 export PYTHONPATH=$PYTHONPATH:../ 30 py.test 31 cd .. 32 ''; 33 34 doCheck = !isPyPy; # failures due to sqla version mismatch 35 36 meta = with stdenv.lib; { 37 homepage = https://github.com/dahlia/sqlalchemy-imageattach; 38 description = "SQLAlchemy extension for attaching images to entity objects"; 39 license = licenses.mit; 40 }; 41 42}