Files
nixpkgs/pkgs/by-name/so/socat/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

64 lines
1.3 KiB
Nix

{
lib,
fetchurl,
net-tools,
openssl,
readline,
stdenv,
which,
buildPackages,
}:
stdenv.mkDerivation rec {
pname = "socat";
version = "1.8.0.3";
src = fetchurl {
url = "http://www.dest-unreach.org/socat/download/${pname}-${version}.tar.bz2";
hash = "sha256-AesBc2HZW7OmlB6EC1nkRjo/q/kt9BVO0CsWou1qAJU=";
};
postPatch = ''
patchShebangs test.sh
substituteInPlace test.sh \
--replace /bin/rm rm \
--replace /sbin/ifconfig ifconfig
'';
configureFlags =
lib.optionals (!stdenv.hostPlatform.isLinux) [
"--disable-posixmq"
]
++ lib.optionals stdenv.hostPlatform.isFreeBSD [
"--disable-dccp"
];
buildInputs = [
openssl
readline
];
hardeningEnable = [ "pie" ];
enableParallelBuilding = true;
nativeCheckInputs = [
which
net-tools
];
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; [ ryan4yin ];
mainProgram = "socat";
};
}