nixpkgs-suyu/pkgs/applications/networking/mailreaders/notmuch/default.nix
R. RyanTM e1a62d4438 notmuch: 0.26.2 -> 0.27
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/notmuch/versions.

These checks were done:

- built on NixOS
- /nix/store/fc0y8jb20kfm3v4yy3zzc6ipidc1ks1c-notmuch-0.27/bin/notmuch passed the binary check.
- Warning: no invocation of /nix/store/fc0y8jb20kfm3v4yy3zzc6ipidc1ks1c-notmuch-0.27/bin/notmuch-emacs-mua had a zero exit code or showed the expected version
- 1 of 2 passed binary check by having a zero exit code.
- 1 of 2 passed binary check by having the new version present in output.
- found 0.27 with grep in /nix/store/fc0y8jb20kfm3v4yy3zzc6ipidc1ks1c-notmuch-0.27
- directory tree listing: https://gist.github.com/2a14e6349ea43a555857f9e30bf328ff
- du listing: https://gist.github.com/d08317825ff4ade027455942eb367fdb
2018-06-14 02:37:42 -07:00

108 lines
2.8 KiB
Nix

{ fetchurl, stdenv, fixDarwinDylibNames
, pkgconfig, gnupg
, xapian, gmime, talloc, zlib
, doxygen, perl
, pythonPackages
, bash-completion
, emacs
, ruby
, which, dtach, openssl, bash, gdb, man
}:
with stdenv.lib;
stdenv.mkDerivation rec {
version = "0.27";
name = "notmuch-${version}";
passthru = {
pythonSourceRoot = "${name}/bindings/python";
inherit version;
};
src = fetchurl {
url = "http://notmuchmail.org/releases/${name}.tar.gz";
sha256 = "0xh8vq2sa7r07xb3n13drc6gdiqhcgl0pj0za5xj43qkiwpikls0";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
gnupg # undefined dependencies
xapian gmime talloc zlib # dependencies described in INSTALL
doxygen perl # (optional) api docs
pythonPackages.sphinx pythonPackages.python # (optional) documentation -> doc/INSTALL
bash-completion # (optional) dependency to install bash completion
emacs # (optional) to byte compile emacs code
ruby # (optional) ruby bindings
which dtach openssl bash # test dependencies
]
++ optional stdenv.isDarwin fixDarwinDylibNames
++ optionals (!stdenv.isDarwin) [ gdb man ]; # test dependencies
postPatch = ''
patchShebangs configure
find test/ -type f -exec \
sed -i \
-e "1s|#!/usr/bin/env bash|#!${bash}/bin/bash|" \
"{}" ";"
for src in \
util/crypto.c \
notmuch-config.c
do
substituteInPlace "$src" \
--replace \"gpg\" \"${gnupg}/bin/gpg\"
done
'';
# Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
# friends
setOutputFlags = false;
enableParallelBuilding = true;
makeFlags = "V=1";
preFixup = optionalString stdenv.isDarwin ''
set -e
die() {
>&2 echo "$@"
exit 1
}
prg="$out/bin/notmuch"
lib="$(find "$out/lib" -name 'libnotmuch.?.dylib')"
[[ -s "$prg" ]] || die "couldn't find notmuch binary"
[[ -s "$lib" ]] || die "couldn't find libnotmuch"
badname="$(otool -L "$prg" | awk '$1 ~ /libtalloc/ { print $1 }')"
goodname="$(find "${talloc}/lib" -name 'libtalloc.*.*.*.dylib')"
[[ -n "$badname" ]] || die "couldn't find libtalloc reference in binary"
[[ -n "$goodname" ]] || die "couldn't find libtalloc in nix store"
echo "fixing libtalloc link in $lib"
install_name_tool -change "$badname" "$goodname" "$lib"
echo "fixing libtalloc link in $prg"
install_name_tool -change "$badname" "$goodname" "$prg"
'';
doCheck = !stdenv.isDarwin && (versionAtLeast gmime.version "3.0");
checkTarget = "test V=1";
postInstall = ''
make install-man
'';
dontGzipMan = true; # already compressed
meta = {
description = "Mail indexer";
homepage = https://notmuchmail.org/;
license = licenses.gpl3;
maintainers = with maintainers; [ chaoflow flokli garbas the-kenny ];
platforms = platforms.unix;
};
}