about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-10-01 23:12:46 +0200
committermakefu <github@syntax-fehler.de>2018-10-14 02:13:25 +0200
commitff444175b3a48994e280e4516c2b32a5f7cbe5fc (patch)
treeb17aaa456d3fd16d13f7f3624f6f869eb3b9cb06 /pkgs/development/python-modules
parent510c85f349507bc99418cd669de75981a3537448 (diff)
downloadnixlib-ff444175b3a48994e280e4516c2b32a5f7cbe5fc.tar
nixlib-ff444175b3a48994e280e4516c2b32a5f7cbe5fc.tar.gz
nixlib-ff444175b3a48994e280e4516c2b32a5f7cbe5fc.tar.bz2
nixlib-ff444175b3a48994e280e4516c2b32a5f7cbe5fc.tar.lz
nixlib-ff444175b3a48994e280e4516c2b32a5f7cbe5fc.tar.xz
nixlib-ff444175b3a48994e280e4516c2b32a5f7cbe5fc.tar.zst
nixlib-ff444175b3a48994e280e4516c2b32a5f7cbe5fc.zip
pythonPackages.peewee: init at 3.7.1
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/peewee/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix
new file mode 100644
index 000000000000..09ee7dc92eaa
--- /dev/null
+++ b/pkgs/development/python-modules/peewee/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib, buildPythonPackage, fetchFromGitHub
+, sqlite
+, cython
+, apsw
+, flask
+, withPostgres ? false, psycopg2
+, withMysql ? false, mysql-connector
+}:
+
+buildPythonPackage rec {
+
+  pname = "peewee";
+  version = "3.7.1";
+
+  # pypi release does not provide tests
+  src = fetchFromGitHub {
+    owner = "coleifer";
+    repo = pname;
+    rev = version;
+    sha256 = "0chn8mknzvkmcmysy2291hanf0vg3sfzqgfc5hqx1nnrd6qkiq8r";
+  };
+
+
+  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;
+  };
+}