From 1a91d50ff2b621d5ea91d88f66acad7072c87dd3 Mon Sep 17 00:00:00 2001 From: Renaud Date: Fri, 2 Nov 2018 00:11:07 +0100 Subject: [PATCH] dropwatch: init at 1.5 (#49593) --- pkgs/os-specific/linux/dropwatch/default.nix | 35 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/os-specific/linux/dropwatch/default.nix diff --git a/pkgs/os-specific/linux/dropwatch/default.nix b/pkgs/os-specific/linux/dropwatch/default.nix new file mode 100644 index 000000000000..936dbf719a87 --- /dev/null +++ b/pkgs/os-specific/linux/dropwatch/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +, libnl, readline, libbfd, ncurses, zlib }: + +stdenv.mkDerivation rec { + pname = "dropwatch"; + version = "1.5"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "nhorman"; + repo = pname; + rev = version; + sha256 = "085hyyl28v0vpxfnmzchl97fjfnzj46ynhkg6y4i6h194y0d99m7"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + buildInputs = [ libbfd libnl ncurses readline zlib ]; + + # To avoid running into https://sourceware.org/bugzilla/show_bug.cgi?id=14243 we need to define: + NIX_CFLAGS_COMPILE = [ + "-DPACKAGE=${pname}" + "-DPACKAGE_VERSION=${version}" + ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Kernel dropped packet monitor"; + homepage = https://github.com/nhorman/dropwatch; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.c0bw3b ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4a5a4ac6f926..20dbd2552dcb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14018,6 +14018,8 @@ with pkgs; drbd = callPackage ../os-specific/linux/drbd { }; + dropwatch = callPackage ../os-specific/linux/dropwatch { }; + dstat = callPackage ../os-specific/linux/dstat { }; # unstable until the first 1.x release