1 { stdenv, lib, buildPythonPackage, isPyPy, fetchPypi, postgresql, openssl }:
3 buildPythonPackage rec {
7 # Extension modules don't work well with PyPy. Use psycopg2cffi instead.
8 # c.f. https://github.com/NixOS/nixpkgs/pull/104151#issuecomment-729750892
12 inherit pname version;
13 sha256 = "fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543";
16 buildInputs = lib.optional stdenv.isDarwin openssl;
17 nativeBuildInputs = [ postgresql ];
22 description = "PostgreSQL database adapter for the Python programming language";
23 license = with licenses; [ gpl2 zpl20 ];