mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
postfix: add trivial updater
This commit is contained in:
parent
4e9efbd52a
commit
4efd9c440b
2 changed files with 15 additions and 1 deletions
|
@ -104,7 +104,11 @@ in stdenv.mkDerivation rec {
|
|||
--prefix PATH ":" ${lib.makeBinPath [ coreutils findutils gnugrep gawk gnused ]}
|
||||
'';
|
||||
|
||||
passthru.tests = { inherit (nixosTests) postfix postfix-raise-smtpd-tls-security-level; };
|
||||
passthru = {
|
||||
tests = { inherit (nixosTests) postfix postfix-raise-smtpd-tls-security-level; };
|
||||
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.postfix.org/";
|
||||
|
|
10
pkgs/servers/mail/postfix/update.sh
Executable file
10
pkgs/servers/mail/postfix/update.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl pcre common-updater-scripts
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
# Expect the text in format of '<a href="official/postfix-3.7.4.tar.gz">Source code</a> |'
|
||||
# Stable release goes first.
|
||||
new_version="$(curl -s http://cdn.postfix.johnriley.me/mirrors/postfix-release/index.html |
|
||||
pcregrep -o1 '"official/postfix-([0-9.]+)[.]tar[.]gz">' | head -n1)"
|
||||
update-source-version postfix "$new_version"
|
Loading…
Reference in a new issue