summary refs log tree commit diff
path: root/pkgs/development/python-modules/sqlalchemy-imageattach/default.nix
blob: eefb53dd7a607df766d5057a56bf4e14200a12d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ stdenv
, 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

  meta = with stdenv.lib; {
    homepage = https://github.com/dahlia/sqlalchemy-imageattach;
    description = "SQLAlchemy extension for attaching images to entity objects";
    license = licenses.mit;
  };

}