lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 24.05-pre 60 lines 1.7 kB view raw
1{ lib 2, stdenv 3, fetchurl 4, fetchpatch 5, libmnl 6, pkg-config 7, writeScript 8}: 9 10stdenv.mkDerivation rec { 11 pname = "ethtool"; 12 version = "6.1"; 13 14 src = fetchurl { 15 url = "mirror://kernel/software/network/${pname}/${pname}-${version}.tar.xz"; 16 sha256 = "sha256-xB/Igf+lpAQy0t2CnrRMZKSd7kgucWuqz5Jixk2qj5A="; 17 }; 18 19 patches = [ 20 # Patch that fixes build with musl libc 21 # NOTE remove on next release, since it is applied in upstream 22 (fetchpatch { 23 name = "Fix-build-with-musl-libc.patch"; 24 url = "https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/patch/marvell.c?id=41be533331fc3c6b711dbe532405782d3b8be5d1"; 25 sha256 = "sha256-CItvt/eeNJkr1sOzaaHZhAnaybDutL9cT2O6XwQll+M="; 26 }) 27 ]; 28 29 nativeBuildInputs = [ 30 pkg-config 31 ]; 32 33 buildInputs = [ 34 libmnl 35 ]; 36 37 passthru = { 38 updateScript = writeScript "update-ethtool" '' 39 #!/usr/bin/env nix-shell 40 #!nix-shell -i bash -p curl pcre common-updater-scripts 41 42 set -eu -o pipefail 43 44 # Expect the text in format of '<a href="ethtool-VER.tar.xz">...</a>' 45 # The page always lists versions newest to oldest. Pick the first one. 46 new_version="$(curl -s https://mirrors.edge.kernel.org/pub/software/network/ethtool/ | 47 pcregrep -o1 '<a href="ethtool-([0-9.]+)[.]tar[.]xz">' | 48 head -n1)" 49 update-source-version ${pname} "$new_version" 50 ''; 51 }; 52 53 meta = with lib; { 54 description = "Utility for controlling network drivers and hardware"; 55 homepage = "https://www.kernel.org/pub/software/network/ethtool/"; 56 license = licenses.gpl2Plus; 57 platforms = platforms.linux; 58 maintainers = with maintainers; [ bjornfor ]; 59 }; 60}