nixpkgs/pkgs/by-name/sm/smokeping/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, fping, rrdtool, perlPackages, autoreconfHook, nixosTests }:
stdenv.mkDerivation rec {
pname = "smokeping";
version = "2.8.2";
src = fetchurl {
url = "https://oss.oetiker.ch/smokeping/pub/smokeping-${version}.tar.gz";
sha256 = "sha256-KeYRGLRV4juWmtpfjiq0MtPi74fUr+LIbeSgPXGItuo=";
};
patches = [
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/smokeping/raw/4ebf1921706a5a29c758fdce2f59cc35652c944a/f/smokeping-2.8.2-no-3rd-party.patch";
hash = "sha256-97rQ4m9HHl3lIpQyjZvu+gZSrNIB2pckxmopCQAQPp0=";
})
];
propagatedBuildInputs = [ rrdtool ] ++
(with perlPackages; [ perl FCGI CGI CGIFast ConfigGrammar DigestHMAC NetTelnet
NetOpenSSH NetSNMP LWP IOTty fping NetDNS perlldap ]);
nativeBuildInputs = [ autoreconfHook ];
postInstall = ''
mv $out/htdocs/smokeping.fcgi.dist $out/htdocs/smokeping.fcgi
'';
passthru.tests.smokeping = nixosTests.smokeping;
meta = {
description = "Network latency collector";
homepage = "https://oss.oetiker.ch/smokeping";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
maintainers = [ ];
};
}