python3Packages.psycopg2: disable when python<3.6, update license

This commit is contained in:
Martin Weinelt 2021-06-21 14:12:42 +02:00
parent 8bedadf5d5
commit d4971edd52

View file

@ -1,4 +1,12 @@
{ stdenv, lib, buildPythonPackage, isPyPy, fetchPypi, postgresql, openssl }:
{ stdenv
, lib
, buildPythonPackage
, pythonOlder
, isPyPy
, fetchPypi
, postgresql
, openssl
}:
buildPythonPackage rec {
pname = "psycopg2";
@ -6,20 +14,27 @@ buildPythonPackage rec {
# Extension modules don't work well with PyPy. Use psycopg2cffi instead.
# c.f. https://github.com/NixOS/nixpkgs/pull/104151#issuecomment-729750892
disabled = isPyPy;
disabled = pythonOlder "3.6" || isPyPy;
src = fetchPypi {
inherit pname version;
sha256 = "de5303a6f1d0a7a34b9d40e4d3bef684ccc44a49bbe3eb85e3c0bffb4a131b7c";
sha256 = "0z0v2d5gpgy0wf2ypqxv955c9k44yszd7r20km5s79yhy6k06lyy";
};
buildInputs = lib.optional stdenv.isDarwin openssl;
nativeBuildInputs = [ postgresql ];
nativeBuildInputs = [
postgresql
];
buildInputs = lib.optionals stdenv.isDarwin [
openssl
];
# requires setting up a postgresql database
doCheck = false;
meta = with lib; {
description = "PostgreSQL database adapter for the Python programming language";
license = with licenses; [ gpl2 zpl20 ];
homepage = "https://www.psycopg.org";
license = with licenses; [ lgpl3 zpl20 ];
};
}