{ poetry2nix, runCommand, fetchFromGitHub, openldap, cyrus_sasl, pkg-config, python36 }: let version = "13.0"; commit = "8353c069529030bddf4bff071c13906565ddc7f1"; poetryApp = poetry2nix.mkPoetryApplication rec { src = fetchFromGitHub { owner = "odoo"; repo = "odoo"; rev = commit; sha256 = "0lyq7bylb4xnry7vn1k39k0w9i064hpm1d3fq2h9lsyakhxdnb1p"; }; overrides = poetry2nix.overrides.withDefaults (self: super: { pyldap = super.pyldap.overridePythonAttrs (old: { buildInputs = old.buildInputs ++ [ openldap cyrus_sasl ]; nativeBuildInputs = old.nativeBuildInputs ++ [ pkg-config ]; preConfigure = old.preConfigure or "" + '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${cyrus_sasl.dev}/include/sasl" ''; }); }); pyproject = ./pyproject.toml; poetrylock = ./poetry.lock; python = python36; nativeBuildInputs = [ openldap ]; preBuild = '' mv addons/* odoo/addons ''; }; in runCommand "python3.6-odoo-${version}" {} '' mkdir -p $out cp -a ${poetryApp}/* $out/ chmod -R u+w $out find $out -type f -exec sed -i -e "s@${poetryApp}@$out@g" {} \; cd $out/lib/python3.6/site-packages/odoo patch -p2 < ${./odoo.patch} ''