From 03efb61d1d2938e5dbf40df0c622d92e7a8c8185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Wed, 28 Aug 2024 07:08:13 +0200 Subject: [PATCH] neomutt: apply nixfmt-rfc-style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- .../mailreaders/neomutt/default.nix | 138 ++++++++++++------ 1 file changed, 94 insertions(+), 44 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/neomutt/default.nix b/pkgs/applications/networking/mailreaders/neomutt/default.nix index d3c2fda9588f..bc6dc831865f 100644 --- a/pkgs/applications/networking/mailreaders/neomutt/default.nix +++ b/pkgs/applications/networking/mailreaders/neomutt/default.nix @@ -1,8 +1,37 @@ -{ lib, stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which -, ncurses, perl , cyrus_sasl, gss, gpgme, libkrb5, libidn2, libxml2, notmuch, openssl -, lua, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, w3m, mailcap, sqlite, zlib, lndir -, pkg-config, zstd, enableZstd ? true, enableMixmaster ? false, enableLua ? false -, withContrib ? true +{ + lib, + stdenv, + fetchFromGitHub, + gettext, + makeWrapper, + tcl, + which, + ncurses, + perl, + cyrus_sasl, + gss, + gpgme, + libkrb5, + libidn2, + libxml2, + notmuch, + openssl, + lua, + lmdb, + libxslt, + docbook_xsl, + docbook_xml_dtd_42, + w3m, + mailcap, + sqlite, + zlib, + lndir, + pkg-config, + zstd, + enableZstd ? true, + enableMixmaster ? false, + enableLua ? false, + withContrib ? true, }: stdenv.mkDerivation (finalAttrs: { @@ -10,22 +39,38 @@ stdenv.mkDerivation (finalAttrs: { version = "20240425"; src = fetchFromGitHub { - owner = "neomutt"; - repo = "neomutt"; - rev = finalAttrs.version; - hash = "sha256-QBqPFteoAm3AdQN0XTWpho8DEW2BFCCzBcHUZIiSxyQ="; + owner = "neomutt"; + repo = "neomutt"; + rev = finalAttrs.version; + hash = "sha256-QBqPFteoAm3AdQN0XTWpho8DEW2BFCCzBcHUZIiSxyQ="; }; buildInputs = [ - cyrus_sasl gss gpgme libkrb5 libidn2 ncurses - notmuch openssl perl lmdb - mailcap sqlite - ] - ++ lib.optional enableZstd zstd - ++ lib.optional enableLua lua; + cyrus_sasl + gss + gpgme + libkrb5 + libidn2 + ncurses + notmuch + openssl + perl + lmdb + mailcap + sqlite + ] ++ lib.optional enableZstd zstd ++ lib.optional enableLua lua; nativeBuildInputs = [ - docbook_xsl docbook_xml_dtd_42 gettext libxml2 libxslt.bin makeWrapper tcl which zlib w3m + docbook_xsl + docbook_xml_dtd_42 + gettext + libxml2 + libxslt.bin + makeWrapper + tcl + which + zlib + w3m pkg-config ]; @@ -49,31 +94,33 @@ stdenv.mkDerivation (finalAttrs: { --replace /etc/mime.types ${mailcap}/etc/mime.types ''; - configureFlags = [ - "--enable-autocrypt" - "--gpgme" - "--gss" - "--lmdb" - "--notmuch" - "--ssl" - "--sasl" - "--with-homespool=mailbox" - "--with-mailpath=" - # To make it not reference .dev outputs. See: - # https://github.com/neomutt/neomutt/pull/2367 - "--disable-include-path-in-cflags" - "--zlib" - ] - ++ lib.optional enableZstd "--zstd" - ++ lib.optional enableLua "--lua" - ++ lib.optional enableMixmaster "--mixmaster"; + configureFlags = + [ + "--enable-autocrypt" + "--gpgme" + "--gss" + "--lmdb" + "--notmuch" + "--ssl" + "--sasl" + "--with-homespool=mailbox" + "--with-mailpath=" + # To make it not reference .dev outputs. See: + # https://github.com/neomutt/neomutt/pull/2367 + "--disable-include-path-in-cflags" + "--zlib" + ] + ++ lib.optional enableZstd "--zstd" + ++ lib.optional enableLua "--lua" + ++ lib.optional enableMixmaster "--mixmaster"; - postInstall = '' - wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt" - '' - # https://github.com/neomutt/neomutt-contrib - # Contains vim-keys, keybindings presets and more. - + lib.optionalString withContrib "${lib.getExe lndir} ${finalAttrs.passthru.contrib} $out/share/doc/neomutt"; + postInstall = + '' + wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt" + '' + # https://github.com/neomutt/neomutt-contrib + # Contains vim-keys, keybindings presets and more. + + lib.optionalString withContrib "${lib.getExe lndir} ${finalAttrs.passthru.contrib} $out/share/doc/neomutt"; doCheck = true; @@ -111,9 +158,12 @@ stdenv.mkDerivation (finalAttrs: { meta = { description = "Small but very powerful text-based mail client"; mainProgram = "neomutt"; - homepage = "https://www.neomutt.org"; - license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ erikryb raitobezarius ]; - platforms = lib.platforms.unix; + homepage = "https://www.neomutt.org"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ + erikryb + raitobezarius + ]; + platforms = lib.platforms.unix; }; })