From 1b083cf9ff4fbbe5457565c2f7e11df6a9c79967 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 10 Oct 2021 12:56:49 +0200 Subject: udp2raw --- overlays/udp2raw/default.nix | 3 +++ overlays/udp2raw/package.nix | 18 ++++++++++++++++++ overlays/udp2raw/udp2raw-makefile.patch | 13 +++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 overlays/udp2raw/default.nix create mode 100644 overlays/udp2raw/package.nix create mode 100644 overlays/udp2raw/udp2raw-makefile.patch (limited to 'overlays') diff --git a/overlays/udp2raw/default.nix b/overlays/udp2raw/default.nix new file mode 100644 index 00000000..b08bdf4b --- /dev/null +++ b/overlays/udp2raw/default.nix @@ -0,0 +1,3 @@ +final: prev: { + udp2raw = final.callPackage ./package.nix {}; +} diff --git a/overlays/udp2raw/package.nix b/overlays/udp2raw/package.nix new file mode 100644 index 00000000..24d040d6 --- /dev/null +++ b/overlays/udp2raw/package.nix @@ -0,0 +1,18 @@ +{ pkgsMusl, fetchFromGitHub }: +pkgsMusl.stdenv.mkDerivation { + name = "udp2raw"; + src = fetchFromGitHub { + repo = "udp2raw-tunnel"; + owner = "wangyu-"; + rev = "5cc304a26181ee17bc583b79a2e80449ea63e1b7"; + sha256 = "0j6l33rnxk0zf3xmg1x0k8ffzp11y124k2m8nfj1568zjy3qcdif"; + }; + patches = [ ./udp2raw-makefile.patch ]; + configurePhase = ""; + buildPhase = '' + make amd64 + ''; + installPhase = '' + install -Dm755 udp2raw_amd64 $out/bin/udp2raw + ''; +} diff --git a/overlays/udp2raw/udp2raw-makefile.patch b/overlays/udp2raw/udp2raw-makefile.patch new file mode 100644 index 00000000..80b39c6b --- /dev/null +++ b/overlays/udp2raw/udp2raw-makefile.patch @@ -0,0 +1,13 @@ +diff --git a/makefile b/makefile +index e758e68..16a3b23 100755 +--- a/makefile ++++ b/makefile +@@ -53,7 +53,7 @@ mips24kc_le_asm_aes: git_version + #bcm2708: + # ${cc_bcm2708} -o ${NAME}_bcm2708 -I. ${SOURCES} ${FLAGS} -lrt -static -O3 + amd64:git_version +- ${cc_local} -o ${NAME}_$@ -I. ${SOURCES} ${FLAGS} -lrt -static -O3 ++ ${CXX} -o ${NAME}_$@ -I. ${SOURCES} ${FLAGS} -lrt -static -O3 + + amd64_perf:git_version + ${cc_local} -o ${NAME}_$@ -I. ${SOURCES} ${FLAGS} -lrt -static -O0 -fno-omit-frame-pointer -g -- cgit v1.2.3