v1/drvs: add nixpkgs-overrides for odoos psycopg2

...to fix aarch64-darwin builds
This commit is contained in:
phaer 2023-07-13 09:31:40 +02:00
parent 8149d6d59b
commit 6819a15ccc

View File

@ -39,12 +39,28 @@ in {
"${src}"
];
# These buildInputs are only used during locking, well-behaved, i.e.
# PEP 518 packages should not those, but some packages like psycopg2
# require dependencies to be available during locking in order to execute
# setup.py. This is fixed in psycopg3
nativeBuildInputs = [config.deps.postgresql];
# fix some builds via overrides
# fix some builds via package-specific overrides
drvs = {
psycopg2.mkDerivation = {
nativeBuildInputs = [config.deps.postgresql];
psycopg2 = {
# We can bulk-inherit overrides from nixpkgs, to which often helps to
# get something working quickly. In this case it's needed for psycopg2
# to build on aarch64-darwin. We exclude propagatedBuildInputs to keep
# python deps from our lock file and avoid version conflicts
nixpkgs-overrides = {
enable = true;
exclude = ["propagatedBuildInputs"];
};
# packages-specific build inputs that are used for this
# package only. Included here for demonstration
# purposes, as nativeBuildInputs from nixpkgs-overrides
# should already include it
mkDerivation.nativeBuildInputs = [config.deps.postgresql];
};
libsass.mkDerivation = {
doCheck = false;