Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / psycopg2 / default.nix
blob4e0a2771e9a8ea3d20dd08b0d10ce6f5dd1542db
1 { stdenv, lib, buildPythonPackage, isPyPy, fetchPypi, postgresql, openssl }:
3 buildPythonPackage rec {
4   pname = "psycopg2";
5   version = "2.8.6";
7   # Extension modules don't work well with PyPy. Use psycopg2cffi instead.
8   # c.f. https://github.com/NixOS/nixpkgs/pull/104151#issuecomment-729750892
9   disabled = isPyPy;
11   src = fetchPypi {
12     inherit pname version;
13     sha256 = "fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543";
14   };
16   buildInputs = lib.optional stdenv.isDarwin openssl;
17   nativeBuildInputs = [ postgresql ];
19   doCheck = false;
21   meta = with lib; {
22     description = "PostgreSQL database adapter for the Python programming language";
23     license = with licenses; [ gpl2 zpl20 ];
24   };