depot/third_party/nixpkgs/pkgs/tools/networking/socat/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

33 lines
939 B
Nix

{ stdenv, fetchurl, openssl, readline, which, nettools }:
stdenv.mkDerivation rec {
name = "socat-1.7.3.4";
src = fetchurl {
url = "http://www.dest-unreach.org/socat/download/${name}.tar.bz2";
sha256 = "1z7xgnwiqpcv1j6aghhj9nqbx7cg3gpc4n9j7vi9hm7nhv5788wp";
};
postPatch = ''
patchShebangs test.sh
substituteInPlace test.sh \
--replace /bin/rm rm \
--replace /sbin/ifconfig ifconfig
'';
buildInputs = [ openssl readline ];
hardeningEnable = [ "pie" ];
checkInputs = [ which nettools ];
doCheck = false; # fails a bunch, hangs
meta = {
description = "A 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";
platforms = stdenv.lib.platforms.unix;
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.eelco ];
};
}