diff --git a/pkgs/development/python-modules/JPype1/default.nix b/pkgs/development/python-modules/JPype1/default.nix new file mode 100644 index 000000000000..b52871793bee --- /dev/null +++ b/pkgs/development/python-modules/JPype1/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k }: + +buildPythonPackage rec { + pname = "JPype1"; + version = "0.6.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "09bzmnzkjbrf60h39wapxc1l8mb3r9km486cly0mm78bv096884r"; + }; + + patches = [ ./set-compiler-language.patch ]; + + # Test loader complains about non-test module on python3. + doCheck = !isPy3k; + + meta = { + homepage = "https://github.com/originell/jpype/"; + license = "License :: OSI Approved :: Apache Software License"; + description = "A Python to Java bridge."; + }; +} diff --git a/pkgs/development/python-modules/JPype1/set-compiler-language.patch b/pkgs/development/python-modules/JPype1/set-compiler-language.patch new file mode 100644 index 000000000000..1d5921a6ffab --- /dev/null +++ b/pkgs/development/python-modules/JPype1/set-compiler-language.patch @@ -0,0 +1,12 @@ +diff -Naur a/setup.py b/setup.py +--- a/setup.py 2017-01-12 19:08:44.000000000 -0500 ++++ b/setup.py 2018-02-15 12:28:16.000000000 -0500 +@@ -123,7 +123,7 @@ + + # extra compile args + copt = {'msvc': ['/EHsc'], +- 'unix' : ['-ggdb'], ++ 'unix' : ['-ggdb', '-x', 'c++'], + 'mingw32' : [], + } + # extra link args diff --git a/pkgs/development/python-modules/JayDeBeApi/default.nix b/pkgs/development/python-modules/JayDeBeApi/default.nix new file mode 100644 index 000000000000..a423945b0ce8 --- /dev/null +++ b/pkgs/development/python-modules/JayDeBeApi/default.nix @@ -0,0 +1,16 @@ +{ lib, buildPythonPackage, fetchPypi, JPype1 }: + +buildPythonPackage rec { + pname = "JayDeBeApi"; + version = "1.1.1"; + src = fetchPypi { + inherit pname version; + sha256 = "0a189xs9zw81jvwwglvf2qyqnk6ra0biljssx9n4ffayqn9glbds"; + }; + propagatedBuildInputs = [ JPype1 ]; + meta = { + homepage = "https://github.com/baztian/jaydebeapi"; + license = lib.licenses.lgpl2; + description = "Use JDBC database drivers from Python 2/3 or Jython with a DB-API."; + }; +}