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