a944afd061
GitOrigin-RevId: 2247d824fe07f16325596acc7faa286502faffd1
25 lines
726 B
Nix
25 lines
726 B
Nix
{ stdenv, lib, buildPythonPackage, isPyPy, fetchPypi, postgresql, openssl }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "psycopg2";
|
|
version = "2.8.6";
|
|
|
|
# Extension modules don't work well with PyPy. Use psycopg2cffi instead.
|
|
# c.f. https://github.com/NixOS/nixpkgs/pull/104151#issuecomment-729750892
|
|
disabled = isPyPy;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543";
|
|
};
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin openssl;
|
|
nativeBuildInputs = [ postgresql ];
|
|
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "PostgreSQL database adapter for the Python programming language";
|
|
license = with licenses; [ gpl2 zpl20 ];
|
|
};
|
|
}
|