-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
notmuch: fix cross #225111
notmuch: fix cross #225111
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
{ fetchurl, lib, stdenv, makeWrapper | ||
{ lib | ||
, stdenv | ||
, buildPackages | ||
, fetchurl | ||
, fetchpatch | ||
, makeWrapper | ||
, pkg-config, gnupg | ||
, xapian, gmime3, sfsexp, talloc, zlib | ||
, doxygen, perl, texinfo | ||
|
@@ -8,7 +13,7 @@ | |
, ruby | ||
, testers | ||
, which, dtach, openssl, bash, gdb, man, git | ||
, withEmacs ? true | ||
, withEmacs ? !emacs.meta.broken | ||
, withRuby ? true | ||
, withSfsexp ? true # also installs notmuch-git, which requires sexp-support | ||
}: | ||
|
@@ -28,6 +33,8 @@ stdenv.mkDerivation rec { | |
pythonPackages.sphinx # (optional) documentation -> doc/INSTALL | ||
texinfo # (optional) documentation -> doc/INSTALL | ||
pythonPackages.cffi | ||
gnupg | ||
perl | ||
] ++ lib.optional withEmacs emacs | ||
++ lib.optional withRuby ruby | ||
++ lib.optional withSfsexp makeWrapper; | ||
|
@@ -40,6 +47,19 @@ stdenv.mkDerivation rec { | |
] ++ lib.optional withRuby ruby | ||
++ lib.optional withSfsexp sfsexp; | ||
|
||
patches = [ | ||
(fetchpatch { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Too bad upstream uses mailing lists for tracking development... I know its a lot to ask, but are you aware of any attempts to tell them about these issues? It'd be nice to add some comment just in case. |
||
url = "https://raw.githubusercontent.com/void-linux/void-packages/8c1f637c706483577a22c8d4f2d06d5f041c9093/srcpkgs/notmuch/patches/0001-configure-detect-version-by-compiler-for-build.patch"; | ||
hash = "sha256-Xs4hw3BPXBh8jGmx6UZsnuiosBCtjo8MWQlWAAgqKgg="; | ||
}) | ||
(fetchpatch { | ||
url = "https://raw.githubusercontent.com/void-linux/void-packages/8c1f637c706483577a22c8d4f2d06d5f041c9093/srcpkgs/notmuch/patches/0005-configure-drop-gmime-session-key-extraction-support-.patch"; | ||
hash = "sha256-FXnNtkTqV7ZSIObQSwGu6THX0Rgvj4WeJySTIcJea1Y="; | ||
}) | ||
]; | ||
|
||
XAPIAN_CONFIG = "${xapian}/bin/xapian-config"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem like it would behave well in a cross compilation... |
||
|
||
postPatch = '' | ||
patchShebangs configure test/ | ||
|
||
|
@@ -49,12 +69,20 @@ stdenv.mkDerivation rec { | |
# do not override CFLAGS of the Makefile created by mkmf | ||
substituteInPlace bindings/Makefile.local \ | ||
--replace 'CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC"' "" | ||
substituteInPlace configure \ | ||
--replace 'pkg-config' "${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config" | ||
substituteInPlace configure \ | ||
--replace './_check_x509_validity' 'true' | ||
substituteInPlace configure \ | ||
--replace './_check_session_keys' 'true' | ||
Comment on lines
+72
to
+77
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: You can do it all in a single |
||
|
||
'' + lib.optionalString withEmacs '' | ||
substituteInPlace emacs/notmuch-emacs-mua \ | ||
--replace 'EMACS:-emacs' 'EMACS:-${emacs}/bin/emacs' \ | ||
--replace 'EMACSCLIENT:-emacsclient' 'EMACSCLIENT:-${emacs}/bin/emacsclient' | ||
''; | ||
|
||
CC_FOR_BUILD="${buildPackages.stdenv.cc}/bin/cc"; | ||
configureFlags = [ | ||
"--zshcompletiondir=${placeholder "out"}/share/zsh/site-functions" | ||
"--bashcompletiondir=${placeholder "out"}/share/bash-completion/completions" | ||
|
@@ -124,6 +152,8 @@ stdenv.mkDerivation rec { | |
+ lib.optionalString withSfsexp '' | ||
cp notmuch-git $out/bin/notmuch-git | ||
wrapProgram $out/bin/notmuch-git --prefix PATH : $out/bin:${lib.getBin git}/bin | ||
'' + '' | ||
mkdir -p $info | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed all of a sudden? |
||
''; | ||
|
||
passthru = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure the
gnupg
andperl
inbuildInputs
are still needed?