Merge pull request #579 from nix-community/fix-odoo-macos

v1/drvs: add nixpkgs-overrides for odoos psycopg2
This commit is contained in:
Paul Haerle 2023-07-13 10:52:22 +02:00 committed by GitHub
commit 3802b906b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;