# Overrides for the generated python-packages.nix # # This function is intended to be used as an extension to the generated file # python-packages.nix. The main objective is to add needed dependencies of C # libraries and tweak the build instructions where needed. { pkgs , basePythonPackages }: let sed = "sed -i"; in self: super: { "cffi" = super."cffi".override (attrs: { buildInputs = with self; attrs.buildInputs ++ [ pkgs.libffi ]; }); "gevent" = super."gevent".override (attrs: { propagatedBuildInputs = with self; attrs.propagatedBuildInputs ++ [ # NOTE: (marcink) odd requirements from gevent aren't set properly, # thus we need to inject psutil manually self."psutil" ]; }); "hgsubversion" = super."hgsubversion".override (attrs: { propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ pkgs.sqlite #basePythonPackages.sqlite3 self.mercurial ]; }); "subvertpy" = super."subvertpy".override (attrs: { SVN_PREFIX = "${pkgs.subversion.dev}"; nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ pkgs.apr.dev pkgs.aprutil ]; buildInputs = with self; [ pkgs.subversion ]; }); "mercurial" = super."mercurial".override (attrs: { nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ # self.python.modules.curses ]; postInstall = '' rm -f $out/${self.python.sitePackages}/hgext3rd/__pycache__/__init__.*.pyc ''; }); "hg-evolve" = super."hg-evolve".override (attrs: { postInstall = '' rm -f $out/${self.python.sitePackages}/hgext3rd/__init__.py rm -f $out/${self.python.sitePackages}/hgext3rd/__init__.pyc ''; }); "dulwich" = super."dulwich".override (attrs: { patches = [ ./patches/dulwich/handle-dir-refs.patch ]; }); "pygit2" = super."pygit2".override (attrs: { nativeBuildInputs = with self; attrs.nativeBuildInputs ++ [ pkgs.libffi pkgs.libgit2rc ]; buildInputs = with self; attrs.buildInputs ++ [ pkgs.libgit2rc ]; }); "py" = super."py".override (attrs: { buildInputs = with self; attrs.buildInputs ++ [ self."setuptools-scm" ]; }); "zipp" = super."zipp".override (attrs: { buildInputs = with self; attrs.buildInputs ++ [ self."toml" ]; }); # Avoid that base packages screw up the build process inherit (basePythonPackages) setuptools; }