4b15a84707
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.7-peewee/versions
47 lines
942 B
Nix
47 lines
942 B
Nix
{ stdenv, lib, buildPythonPackage, fetchFromGitHub
|
|
, sqlite
|
|
, cython
|
|
, apsw
|
|
, flask
|
|
, withPostgres ? false, psycopg2
|
|
, withMysql ? false, mysql-connector
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "peewee";
|
|
version = "3.9.6";
|
|
|
|
# pypi release does not provide tests
|
|
src = fetchFromGitHub {
|
|
owner = "coleifer";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "1pgmsd7v73d0gqxsa4wnm9s3lyffw46wvvkqn25xgh4v8z869fg2";
|
|
};
|
|
|
|
|
|
checkInputs = [ flask ];
|
|
|
|
checkPhase = ''
|
|
rm -r playhouse # avoid using the folder in the cwd
|
|
python runtests.py
|
|
'';
|
|
|
|
buildInputs = [
|
|
sqlite
|
|
cython # compile speedups
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
apsw # sqlite performance improvement
|
|
] ++ (lib.optional withPostgres psycopg2)
|
|
++ (lib.optional withMysql mysql-connector);
|
|
|
|
meta = with stdenv.lib;{
|
|
description = "a small, expressive orm";
|
|
homepage = http://peewee-orm.com;
|
|
license = licenses.mit;
|
|
};
|
|
}
|