1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
{
cmake,
fetchFromGitHub,
fftw,
gettext,
lib,
libintl,
ncurses,
nix-update-script,
openssl,
stdenv,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "httping";
version = "3.6";
src = fetchFromGitHub {
owner = "folkertvanheusden";
repo = "HTTPing";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-lDgQC3VzfcLqMOQSaRZ/znMamAAGYq/9C9bHgI4G7B8=";
};
nativeBuildInputs = [
cmake
gettext
];
buildInputs = [
fftw
libintl
ncurses
openssl
];
cmakeFlags = [
(lib.cmakeFeature "CMAKE_BUILD_TYPE" "Release")
];
installPhase = ''
runHook preInstall
install -D httping $out/bin/httping
runHook postInstall
'';
passthru = {
tests.version = testers.testVersion {
command = "${lib.getExe finalAttrs.finalPackage} --version";
package = finalAttrs.finalPackage;
};
updateScript = nix-update-script { };
};
meta = {
changelog = "https://github.com/folkertvanheusden/HTTPing/releases/tag/v${finalAttrs.version}";
description = "Ping with HTTP requests";
homepage = "https://vanheusden.com/httping";
license = lib.licenses.agpl3Only;
longDescription = ''
Give httping an url, and it'll show you how long it takes to connect,
send a request and retrieve the reply (only the headers). Be aware that
the transmission across the network also takes time! So it measures the
latency of the webserver + network. It supports IPv6.
'';
mainProgram = "httping";
maintainers = [ lib.maintainers.anthonyroussel ];
platforms = lib.platforms.linux;
};
})
|