nixpkgs/pkgs/tools/networking/pingtcp/default.nix

38 lines
924 B
Nix
Raw Normal View History

2016-01-04 17:59:31 +03:00
{ stdenv, fetchgit, cmake }:
let version = "0.0.3"; in
stdenv.mkDerivation {
name = "pingtcp-${version}";
# This project uses git submodules, which fetchFromGitHub doesn't support:
src = fetchgit {
sha256 = "0an4dbwcp2qv1n068q0s34lz88vl1z2rqfh3j9apbq7bislsrwdd";
rev = "refs/tags/v${version}";
url = "https://github.com/LanetNetwork/pingtcp.git";
};
nativeBuildInputs = [ cmake ];
postPatch = ''
substituteInPlace {.,pfcquirks}/CMakeLists.txt \
--replace "-march=native" ""
'';
enableParallelBuilding = true;
doCheck = false;
2016-01-04 23:13:46 +03:00
postInstall = ''
install -Dm644 {..,$out/share/doc/pingtcp}/README.md
'';
2016-01-04 17:59:31 +03:00
meta = with stdenv.lib; {
inherit version;
description = "Measure TCP handshake time";
homepage = https://github.com/LanetNetwork/pingtcp;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}