ethtool: 5.16 -> 5.17
While at it added trivial updater. changelog: https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/log/
This commit is contained in:
parent
6427998d85
commit
3326297c8e
1 changed files with 19 additions and 2 deletions
|
@ -3,15 +3,16 @@
|
|||
, fetchurl
|
||||
, libmnl
|
||||
, pkg-config
|
||||
, writeScript
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ethtool";
|
||||
version = "5.16";
|
||||
version = "5.17";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/software/network/${pname}/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-qi/vGTbdShF1XfoL25Pw7FvqRSCNJ8l1S8Or4apCwcs=";
|
||||
sha256 = "sha256-ZKuRS5xrRQRyRdkfQLh2CycomSqeWvInF8ZEI46IkTM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -22,6 +23,22 @@ stdenv.mkDerivation rec {
|
|||
libmnl
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-ethtool" ''
|
||||
#!/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="ethtool-VER.tar.xz">...</a>'
|
||||
# The page always lists versions newest to oldest. Pick the first one.
|
||||
new_version="$(curl -s https://mirrors.edge.kernel.org/pub/software/network/ethtool/ |
|
||||
pcregrep -o1 '<a href="ethtool-([0-9.]+)[.]tar[.]xz">' |
|
||||
head -n1)"
|
||||
update-source-version ${pname} "$new_version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Utility for controlling network drivers and hardware";
|
||||
homepage = "https://www.kernel.org/pub/software/network/ethtool/";
|
||||
|
|
Loading…
Reference in a new issue