1{ stdenv, lib, buildPythonPackage, isPyPy, fetchPypi, postgresql, openssl }:
2
3buildPythonPackage rec {
4 pname = "psycopg2";
5 version = "2.8.4";
6
7 disabled = isPyPy;
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "f898e5cc0a662a9e12bde6f931263a1bbd350cfb18e1d5336a12927851825bb6";
12 };
13
14 buildInputs = lib.optional stdenv.isDarwin openssl;
15 nativeBuildInputs = [ postgresql ];
16
17 doCheck = false;
18
19 meta = with lib; {
20 description = "PostgreSQL database adapter for the Python programming language";
21 license = with licenses; [ gpl2 zpl20 ];
22 };
23}