2018-09-07 12:13:15 +02:00
|
|
|
{ stdenv, lib, buildPythonPackage, isPyPy, fetchPypi, postgresql, openssl }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "psycopg2";
|
2020-10-25 10:06:55 +01:00
|
|
|
version = "2.8.6";
|
2018-09-07 12:13:15 +02:00
|
|
|
|
2020-11-18 09:58:42 +01:00
|
|
|
# Extension modules don't work well with PyPy. Use psycopg2cffi instead.
|
|
|
|
# c.f. https://github.com/NixOS/nixpkgs/pull/104151#issuecomment-729750892
|
2018-09-07 12:13:15 +02:00
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-25 10:06:55 +01:00
|
|
|
sha256 = "fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543";
|
2018-09-07 12:13:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin openssl;
|
2019-02-15 10:08:27 +01:00
|
|
|
nativeBuildInputs = [ postgresql ];
|
2018-09-07 12:13:15 +02:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "PostgreSQL database adapter for the Python programming language";
|
|
|
|
license = with licenses; [ gpl2 zpl20 ];
|
|
|
|
};
|
|
|
|
}
|