summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overlays/udp2raw/default.nix3
-rw-r--r--overlays/udp2raw/package.nix18
-rw-r--r--overlays/udp2raw/udp2raw-makefile.patch13
3 files changed, 34 insertions, 0 deletions
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 @@
1final: prev: {
2 udp2raw = final.callPackage ./package.nix {};
3}
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 @@
1{ pkgsMusl, fetchFromGitHub }:
2pkgsMusl.stdenv.mkDerivation {
3 name = "udp2raw";
4 src = fetchFromGitHub {
5 repo = "udp2raw-tunnel";
6 owner = "wangyu-";
7 rev = "5cc304a26181ee17bc583b79a2e80449ea63e1b7";
8 sha256 = "0j6l33rnxk0zf3xmg1x0k8ffzp11y124k2m8nfj1568zjy3qcdif";
9 };
10 patches = [ ./udp2raw-makefile.patch ];
11 configurePhase = "";
12 buildPhase = ''
13 make amd64
14 '';
15 installPhase = ''
16 install -Dm755 udp2raw_amd64 $out/bin/udp2raw
17 '';
18}
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 @@
1diff --git a/makefile b/makefile
2index e758e68..16a3b23 100755
3--- a/makefile
4+++ b/makefile
5@@ -53,7 +53,7 @@ mips24kc_le_asm_aes: git_version
6 #bcm2708:
7 # ${cc_bcm2708} -o ${NAME}_bcm2708 -I. ${SOURCES} ${FLAGS} -lrt -static -O3
8 amd64:git_version
9- ${cc_local} -o ${NAME}_$@ -I. ${SOURCES} ${FLAGS} -lrt -static -O3
10+ ${CXX} -o ${NAME}_$@ -I. ${SOURCES} ${FLAGS} -lrt -static -O3
11
12 amd64_perf:git_version
13 ${cc_local} -o ${NAME}_$@ -I. ${SOURCES} ${FLAGS} -lrt -static -O0 -fno-omit-frame-pointer -g