nixpkgs-suyu/pkgs/tools/networking/socat/default.nix

42 lines
973 B
Nix
Raw Normal View History

2021-01-12 17:32:58 +01:00
{ lib
, fetchurl
, nettools
, openssl
, readline
, stdenv
, which
}:
stdenv.mkDerivation rec {
2021-01-12 17:32:58 +01:00
pname = "socat";
version = "1.7.4.1";
2013-04-12 15:01:01 +02:00
src = fetchurl {
2021-01-12 17:32:58 +01:00
url = "http://www.dest-unreach.org/socat/download/${pname}-${version}.tar.bz2";
sha256 = "1sbmqqvni3ss9wyay6ik5v81kxffkra80mh4ypgj74g82iba5b1z";
};
2018-08-08 23:38:23 +02:00
postPatch = ''
patchShebangs test.sh
substituteInPlace test.sh \
--replace /bin/rm rm \
--replace /sbin/ifconfig ifconfig
'';
2016-06-13 13:08:18 +02:00
buildInputs = [ openssl readline ];
2013-04-12 15:01:01 +02:00
hardeningEnable = [ "pie" ];
2016-02-26 17:45:49 +01:00
2018-08-08 23:38:23 +02:00
checkInputs = [ which nettools ];
doCheck = false; # fails a bunch, hangs
2021-01-12 17:32:58 +01:00
meta = with lib; {
description = "Utility for bidirectional data transfer between two independent data channels";
homepage = "http://www.dest-unreach.org/socat/";
repositories.git = "git://repo.or.cz/socat.git";
2021-01-12 17:32:58 +01:00
platforms = platforms.unix;
license = with licenses; [ gpl2Only ];
maintainers = with maintainers; [ eelco ];
};
}