2021-09-13 08:09:04 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-05-13 17:47:48 +00:00
|
|
|
, fetchpatch
|
2021-09-13 08:09:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "proxychains-ng";
|
2022-01-23 15:29:19 +00:00
|
|
|
version = "4.16";
|
2021-09-13 08:09:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rofl0r";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-23 15:29:19 +00:00
|
|
|
sha256 = "sha256-uu/zN6W0ue526/3a9QeYg6J4HLaovZJVOYXksjouYok=";
|
2021-09-13 08:09:04 +00:00
|
|
|
};
|
|
|
|
|
2022-05-13 17:47:48 +00:00
|
|
|
patches = [
|
2022-05-13 17:48:13 +00:00
|
|
|
# zsh completion
|
2022-05-13 17:47:48 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/rofl0r/proxychains-ng/commit/04023d3811d8ee34b498b429bac7a871045de59c.patch";
|
|
|
|
sha256 = "sha256-Xcg2kmAhj/OJn/RKJAxb9MOJNJQY7FXmxEIzQ5dvabo=";
|
|
|
|
})
|
2022-05-13 17:48:13 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/rofl0r/proxychains-ng/commit/9b42da71f4df7b783cf07a58ffa095e293c43380.patch";
|
|
|
|
sha256 = "sha256-tYv9XP51WtsjaoklwQk3D/MQceoOvtdMwBraECt6AXQ=";
|
|
|
|
})
|
2022-10-11 14:19:16 +00:00
|
|
|
# https://github.com/NixOS/nixpkgs/issues/136093
|
|
|
|
./swap-priority-4-and-5-in-get_config_path.patch
|
2022-05-13 17:47:48 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"install-config"
|
2022-05-13 17:48:13 +00:00
|
|
|
# TODO: check on next update if that works and remove postInstall
|
|
|
|
# "install-zsh-completion"
|
2022-05-13 17:47:48 +00:00
|
|
|
];
|
|
|
|
|
2022-05-13 17:48:13 +00:00
|
|
|
postInstall = ''
|
|
|
|
./tools/install.sh -D -m 644 completions/_proxychains $out/share/zsh/site_functions/_proxychains4
|
|
|
|
'';
|
|
|
|
|
2021-09-13 08:09:04 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A preloader which hooks calls to sockets in dynamically linked programs and redirects it through one or more socks/http proxies";
|
|
|
|
homepage = "https://github.com/rofl0r/proxychains-ng";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ zenithal ];
|
2022-01-12 18:04:39 +00:00
|
|
|
platforms = platforms.linux ++ [ "aarch64-darwin" ];
|
2021-09-13 08:09:04 +00:00
|
|
|
};
|
|
|
|
}
|