diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-10 12:56:49 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-10 12:56:49 +0200 |
commit | 1b083cf9ff4fbbe5457565c2f7e11df6a9c79967 (patch) | |
tree | 1548fdea9f9fe04d27173870dbabd820e60da1c3 | |
parent | 813c221139b6845043695d97ea12ac773497075f (diff) | |
download | nixos-1b083cf9ff4fbbe5457565c2f7e11df6a9c79967.tar nixos-1b083cf9ff4fbbe5457565c2f7e11df6a9c79967.tar.gz nixos-1b083cf9ff4fbbe5457565c2f7e11df6a9c79967.tar.bz2 nixos-1b083cf9ff4fbbe5457565c2f7e11df6a9c79967.tar.xz nixos-1b083cf9ff4fbbe5457565c2f7e11df6a9c79967.zip |
udp2raw
-rw-r--r-- | overlays/udp2raw/default.nix | 3 | ||||
-rw-r--r-- | overlays/udp2raw/package.nix | 18 | ||||
-rw-r--r-- | overlays/udp2raw/udp2raw-makefile.patch | 13 |
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 @@ | |||
1 | final: 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 }: | ||
2 | pkgsMusl.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 @@ | |||
1 | diff --git a/makefile b/makefile | ||
2 | index 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 | ||