9 stdenv.mkDerivation rec {
14 url = "mirror://kernel/software/network/ethtool/ethtool-${version}.tar.xz";
15 sha256 = "sha256-pxsDVAEGYcXPF4vGBu1Q/LkYBc8Yl60OsoGDh6X9DNk=";
27 updateScript = writeScript "update-ethtool" ''
28 #!/usr/bin/env nix-shell
29 #!nix-shell -i bash -p curl pcre common-updater-scripts
33 # Expect the text in format of '<a href="ethtool-VER.tar.xz">...</a>'
34 # The page always lists versions newest to oldest. Pick the first one.
35 new_version="$(curl -s https://mirrors.edge.kernel.org/pub/software/network/ethtool/ |
36 pcregrep -o1 '<a href="ethtool-([0-9.]+)[.]tar[.]xz">' |
38 update-source-version ethtool "$new_version"
43 description = "Utility for controlling network drivers and hardware";
44 homepage = "https://www.kernel.org/pub/software/network/ethtool/";
45 license = licenses.gpl2Plus;
46 platforms = platforms.linux;
47 maintainers = with maintainers; [ bjornfor ];
48 mainProgram = "ethtool";