nixpkgs/pkgs/tools/networking/socat/default.nix
Alyssa Ross 292bc3f53c
socat: enable parallel building
Tested at -j64.
2024-01-06 00:59:51 +01:00

49 lines
1.1 KiB
Nix

{ lib
, fetchurl
, nettools
, openssl
, readline
, stdenv
, which
, buildPackages
}:
stdenv.mkDerivation rec {
pname = "socat";
version = "1.8.0.0";
src = fetchurl {
url = "http://www.dest-unreach.org/socat/download/${pname}-${version}.tar.bz2";
hash = "sha256-4d5oPdIu4OOmxrv/Jpq+GKsMnX62UCBPElFVuQBfrKc=";
};
postPatch = ''
patchShebangs test.sh
substituteInPlace test.sh \
--replace /bin/rm rm \
--replace /sbin/ifconfig ifconfig
'';
buildInputs = [ openssl readline ];
hardeningEnable = [ "pie" ];
enableParallelBuilding = true;
nativeCheckInputs = [ which nettools ];
doCheck = false; # fails a bunch, hangs
passthru.tests = lib.optionalAttrs stdenv.buildPlatform.isLinux {
musl = buildPackages.pkgsMusl.socat;
};
meta = with lib; {
description = "Utility for bidirectional data transfer between two independent data channels";
homepage = "http://www.dest-unreach.org/socat/";
platforms = platforms.unix;
license = with licenses; [ gpl2Only ];
maintainers = with maintainers; [ eelco ];
mainProgram = "socat";
};
}