2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-07 05:23:16 +00:00
nixpkgs/pkgs/tools/networking/udp2raw/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
971 B
Nix
Raw Normal View History

2022-11-28 09:14:11 +00:00
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, iptables
}:
stdenv.mkDerivation rec {
pname = "udp2raw";
2023-02-07 14:12:52 +00:00
version = "20230206.0";
2022-11-28 09:14:11 +00:00
src = fetchFromGitHub {
owner = "wangyu-";
repo = "udp2raw";
rev = version;
2023-02-07 14:12:52 +00:00
hash = "sha256-mchSaqw6sOJ7+dydCM8juP7QMOVUrPL4MFA79Rvyjdo=";
2022-11-28 09:14:11 +00:00
};
nativeBuildInputs = [ makeWrapper ];
makeFlags = [ "dynamic" ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp udp2raw_dynamic $out/bin/udp2raw
wrapProgram $out/bin/udp2raw --prefix PATH : "${lib.makeBinPath [ iptables ]}"
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/wangyu-/udp2raw";
description = "A tunnel which turns UDP traffic into encrypted UDP/FakeTCP/ICMP traffic by using a raw socket";
license = licenses.mit;
changelog = "https://github.com/wangyu-/udp2raw/releases/tag/${version}";
maintainers = with maintainers; [ chvp ];
platforms = platforms.linux;
};
}