From 1383f108d244d22265a66994aeb2ee3c89491571 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Sun, 22 Sep 2024 17:17:43 -0400 Subject: [PATCH 1/3] msmtp: add updateScript MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that msmtp has an update script, the r-ryantm bot should start automatically submitting pull requests that will update msmtp [1]. Those pull requests will help us keep msmtp more up to date (we still haven’t updated to msmtp 1.8.26, and that was released four months ago). [1]: [2]: --- pkgs/applications/networking/msmtp/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/msmtp/default.nix b/pkgs/applications/networking/msmtp/default.nix index 6bd0f38ba6f4..41de81d54ca4 100644 --- a/pkgs/applications/networking/msmtp/default.nix +++ b/pkgs/applications/networking/msmtp/default.nix @@ -20,6 +20,7 @@ , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , systemd , withScripts ? true +, gitUpdater }: let @@ -135,5 +136,8 @@ if withScripts then name = "msmtp-${version}"; inherit version meta; paths = [ binaries scripts ]; - passthru = { inherit binaries scripts; }; + passthru = { + inherit binaries scripts src; + updateScript = gitUpdater { rev-prefix = "msmtp-"; }; + }; } else binaries From bb8884d3b7a2e525c818a2f537774aa5f4edb677 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Sun, 22 Sep 2024 21:34:59 +0000 Subject: [PATCH 2/3] msmtp: 1.8.25 -> 1.8.26 https://marlam.de/msmtp/news/msmtp-1-8-26 --- pkgs/applications/networking/msmtp/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/msmtp/default.nix b/pkgs/applications/networking/msmtp/default.nix index 41de81d54ca4..d2291cc1e922 100644 --- a/pkgs/applications/networking/msmtp/default.nix +++ b/pkgs/applications/networking/msmtp/default.nix @@ -26,13 +26,13 @@ let inherit (lib) getBin getExe optionals; - version = "1.8.25"; + version = "1.8.26"; src = fetchFromGitHub { owner = "marlam"; repo = "msmtp"; rev = "msmtp-${version}"; - hash = "sha256-UZKUpF/ZwYPM2rPDudL1O8e8LguKJh9sTcJRT3vgsf4="; + hash = "sha256-MV3fzjjyr7qZw/BbKgsSObX+cxDDivI+0ZlulrPFiWM="; }; meta = with lib; { @@ -118,6 +118,7 @@ let fix."$MSMTP" = [ "msmtp" ]; fake.external = [ "ping" ] ++ optionals (!withSystemd) [ "systemd-cat" ]; + keep.source = [ "~/.msmtpqrc" ]; }; msmtp-queue = { From 1d3fd9f92d7097459bcf84e6bd0e8a401bdd16f3 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Sun, 22 Sep 2024 17:54:18 -0400 Subject: [PATCH 3/3] msmtp: specify that msmtpq is a wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consider this Nix expression: let pkgs = import /path/to/nixpkgs { }; in pkgs.binlore.collect { drvs = [ pkgs.msmtp ]; } Building that expression will allow you to inspect the binlore for msmtp. Before this change, the lore said that msmtpq might be able to execute its arguments. It would be more correct to say that msmtpq can run its arguments because msmtpq forwards most of its arguments to msmtp [1] and msmtp can run its arguments [2]. This commit makes sure that the msmtp package’s lore declares that the msmtpq command is a wrapper for the msmtp command. This way, anything that accesses msmtpq’s lore will know that msmtpq has the same verdict as msmtp. [1]: [2]: --- pkgs/applications/networking/msmtp/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/applications/networking/msmtp/default.nix b/pkgs/applications/networking/msmtp/default.nix index d2291cc1e922..885a2f826880 100644 --- a/pkgs/applications/networking/msmtp/default.nix +++ b/pkgs/applications/networking/msmtp/default.nix @@ -21,6 +21,8 @@ , systemd , withScripts ? true , gitUpdater +, binlore +, msmtp }: let @@ -139,6 +141,12 @@ if withScripts then paths = [ binaries scripts ]; passthru = { inherit binaries scripts src; + # msmtpq forwards most of its arguments to msmtp [1]. + # + # [1]: + binlore.out = binlore.synthesize msmtp '' + wrapper bin/msmtpq bin/msmtp + ''; updateScript = gitUpdater { rev-prefix = "msmtp-"; }; }; } else binaries