nixpkgs/pkgs/tools/networking/netcat-openbsd/default.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

{stdenv, fetchurl, pkgconfig, libbsd}:
stdenv.mkDerivation rec {
version = "1.187";
deb-version = "${version}-1";
2017-08-25 15:05:48 +02:00
name = "netcat-openbsd-${version}";
srcs = [
(fetchurl {
2017-08-25 15:05:48 +02:00
url = "mirror://debian/pool/main/n/netcat-openbsd/netcat-openbsd_${version}.orig.tar.gz";
sha256 = "0sxsxl7n7hnxz931jqsp86cdwiq2lm4h3w0i2a67935pki924gxw";
})
(fetchurl {
2017-08-25 15:05:48 +02:00
url = "mirror://debian/pool/main/n/netcat-openbsd/netcat-openbsd_${deb-version}.debian.tar.xz";
sha256 = "0jwbdis6avxdjzg8bcab1bdz296rkzzkdlv50fr3q0277fxjs49q";
})
];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libbsd ];
sourceRoot = name;
prePatch = ''
for i in $(cat ../debian/patches/series); do
patch -p1 < "../debian/patches/$i"
done
'';
installPhase = ''
runHook preInstall
install -Dm0755 nc $out/bin/nc
2016-10-30 02:54:19 +02:00
install -Dm0644 nc.1 $out/share/man/man1/nc.1
runHook postInstall
'';
2017-08-25 15:05:48 +02:00
meta = with stdenv.lib; {
homepage = https://packages.debian.org/netcat-openbsd;
2014-11-11 14:20:43 +01:00
description = "TCP/IP swiss army knife, OpenBSD variant";
2017-08-25 15:05:48 +02:00
platforms = platforms.linux;
maintainers = with maintainers; [ willibutz ];
};
}