diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-08-24 18:55:06 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-08-24 18:55:06 -0600 |
| commit | d7ac88762db111a7962c4e14b5f4e37ab85ccac7 (patch) | |
| tree | 0c2c8c4383bef74215e3b7c48a2f6b0117f084bc /pkgs/msmtp/default.nix | |
| parent | 504589d1035f27b766bd33040b415b2725ece4ca (diff) | |
tree-wide: reformat using alejandra after enabling trivionomicon
Diffstat (limited to '')
| -rw-r--r-- | pkgs/msmtp/default.nix | 137 |
1 files changed, 74 insertions, 63 deletions
diff --git a/pkgs/msmtp/default.nix b/pkgs/msmtp/default.nix index 18036f5..23559c5 100644 --- a/pkgs/msmtp/default.nix +++ b/pkgs/msmtp/default.nix @@ -1,28 +1,27 @@ -{ resholve -, stdenv -, symlinkJoin -, lib -, fetchFromGitHub -, autoreconfHook -, pkg-config -, bash -, coreutils -, gnugrep -, gnutls -, gsasl -, libidn2 -, netcat-gnu -, texinfo -, which -, Security -, withKeyring ? true -, libsecret -, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd -, systemd -, withScripts ? true -}: - -let +{ + resholve, + stdenv, + symlinkJoin, + lib, + fetchFromGitHub, + autoreconfHook, + pkg-config, + bash, + coreutils, + gnugrep, + gnutls, + gsasl, + libidn2, + netcat-gnu, + texinfo, + which, + Security, + withKeyring ? true, + libsecret, + withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, + systemd, + withScripts ? true, +}: let inherit (lib) getBin getExe optionals; version = "1.8.22"; @@ -38,7 +37,7 @@ let description = "Simple and easy to use SMTP client with excellent sendmail compatibility"; homepage = "https://marlam.de/msmtp/"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ peterhoeg ]; + maintainers = with maintainers; [peterhoeg]; platforms = platforms.unix; mainProgram = "msmtp"; }; @@ -51,14 +50,16 @@ let ./0001-msmtp-run-passwordeval-if-tls_key_file-is-provided-e.patch ]; - configureFlags = [ "--sysconfdir=/etc" "--with-libgsasl" ] - ++ optionals stdenv.isDarwin [ "--with-macosx-keyring" ]; + configureFlags = + ["--sysconfdir=/etc" "--with-libgsasl"] + ++ optionals stdenv.isDarwin ["--with-macosx-keyring"]; - buildInputs = [ gnutls gsasl libidn2 ] - ++ optionals stdenv.isDarwin [ Security ] - ++ optionals withKeyring [ libsecret ]; + buildInputs = + [gnutls gsasl libidn2] + ++ optionals stdenv.isDarwin [Security] + ++ optionals withKeyring [libsecret]; - nativeBuildInputs = [ autoreconfHook pkg-config texinfo ]; + nativeBuildInputs = [autoreconfHook pkg-config texinfo]; enableParallelBuilding = true; @@ -72,11 +73,15 @@ let pname = "msmtp-scripts"; inherit version src meta; - patches = [ ./paths.patch ]; + patches = [./paths.patch]; postPatch = '' substituteInPlace scripts/msmtpq/msmtpq \ - --replace @journal@ ${if withSystemd then "Y" else "N"} + --replace @journal@ ${ + if withSystemd + then "Y" + else "N" + } ''; dontConfigure = true; @@ -100,41 +105,47 @@ let solutions = { msmtpq = { - scripts = [ "bin/msmtpq" ]; + scripts = ["bin/msmtpq"]; interpreter = getExe bash; - inputs = [ - binaries - coreutils - gnugrep - netcat-gnu - which - ] ++ optionals withSystemd [ systemd ]; - execer = [ - "cannot:${getBin binaries}/bin/msmtp" - "cannot:${getBin netcat-gnu}/bin/nc" - ] ++ optionals withSystemd [ - "cannot:${getBin systemd}/bin/systemd-cat" - ]; - fix."$MSMTP" = [ "msmtp" ]; - fake.external = [ "ping" ] - ++ optionals (!withSystemd) [ "systemd-cat" ]; + inputs = + [ + binaries + coreutils + gnugrep + netcat-gnu + which + ] + ++ optionals withSystemd [systemd]; + execer = + [ + "cannot:${getBin binaries}/bin/msmtp" + "cannot:${getBin netcat-gnu}/bin/nc" + ] + ++ optionals withSystemd [ + "cannot:${getBin systemd}/bin/systemd-cat" + ]; + fix."$MSMTP" = ["msmtp"]; + fake.external = + ["ping"] + ++ optionals (!withSystemd) ["systemd-cat"]; }; msmtp-queue = { - scripts = [ "bin/msmtp-queue" ]; + scripts = ["bin/msmtp-queue"]; interpreter = getExe bash; - inputs = [ "${placeholder "out"}/bin" ]; - execer = [ "cannot:${placeholder "out"}/bin/msmtpq" ]; + inputs = ["${placeholder "out"}/bin"]; + execer = ["cannot:${placeholder "out"}/bin/msmtpq"]; }; }; }; - in -if withScripts then - symlinkJoin - { - name = "msmtp-${version}"; - inherit version meta; - paths = [ binaries scripts ]; - passthru = { inherit binaries scripts; }; - } else binaries + if withScripts + then + symlinkJoin + { + name = "msmtp-${version}"; + inherit version meta; + paths = [binaries scripts]; + passthru = {inherit binaries scripts;}; + } + else binaries |
