offlineimap: refactor
This commit is contained in:
parent
afe829a8e5
commit
66c20b3b2d
@ -15,12 +15,13 @@
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "offlineimap";
|
||||
version = "8.0.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OfflineIMAP";
|
||||
repo = "offlineimap3";
|
||||
rev = "v${version}";
|
||||
sha256 = "0y3giaz9i8vvczlxkbwymfkn3vi9fv599dy4pc2pn2afxsl4mg2w";
|
||||
hash = "sha256-XLxKqO5OCXsFu8S3lMp2Ke5hp6uer9npZ3ujmL6Kb3g=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -43,6 +44,16 @@ python3.pkgs.buildPythonApplication rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Skip xmllint to stop failures due to no network access
|
||||
sed -i docs/Makefile -e "s|a2x -v -d |a2x -L -v -d |"
|
||||
|
||||
# Provide CA certificates (Used when "sslcacertfile = OS-DEFAULT" is configured")
|
||||
sed -i offlineimap/utils/distro_utils.py -e '/def get_os_sslcertfile():/a\ \ \ \ return "${cacert}/etc/ssl/certs/ca-bundle.crt"'
|
||||
'';
|
||||
|
||||
build-system = [ python3.pkgs.setuptools ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
asciidoc
|
||||
docbook_xsl
|
||||
@ -51,7 +62,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
libxslt
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dependencies = with python3.pkgs; [
|
||||
certifi
|
||||
distro
|
||||
imaplib2
|
||||
@ -60,14 +71,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
urllib3
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Skip xmllint to stop failures due to no network access
|
||||
sed -i docs/Makefile -e "s|a2x -v -d |a2x -L -v -d |"
|
||||
|
||||
# Provide CA certificates (Used when "sslcacertfile = OS-DEFAULT" is configured")
|
||||
sed -i offlineimap/utils/distro_utils.py -e '/def get_os_sslcertfile():/a\ \ \ \ return "${cacert}/etc/ssl/certs/ca-bundle.crt"'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
make -C docs man
|
||||
installManPage docs/offlineimap.1
|
||||
|
Loading…
Reference in New Issue
Block a user