nixpkgs-suyu/pkgs/tools/networking/traceroute/default.nix
Daniel Fullmer cecacd61db traceroute: fix cross compilation
Adding env=yes causes the Makefile to use our externally provided
environment variables for things like CC, LD, etc.
2022-02-01 19:40:00 -08:00

25 lines
694 B
Nix

{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "traceroute";
version = "2.1.0";
src = fetchurl {
url = "mirror://sourceforge/traceroute/${pname}-${version}.tar.gz";
sha256 = "3669d22a34d3f38ed50caba18cd525ba55c5c00d5465f2d20d7472e5d81603b6";
};
makeFlags = [ "prefix=$(out)" "LDFLAGS=-lm" "env=yes" ];
preConfigure = ''
sed -i 's@LIBS := \(.*\) -lm \(.*\)@LIBS := \1 \2@' Make.rules
'';
meta = with lib; {
homepage = "http://traceroute.sourceforge.net/";
description = "Tracks the route taken by packets over an IP network";
license = lib.licenses.gpl2;
maintainers = [ maintainers.koral ];
platforms = platforms.linux;
};
}