about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/jool
diff options
context:
space:
mode:
authorapfelkuchen06 <apfelkuchen@hrnz.li>2023-04-16 06:03:43 +0200
committerapfelkuchen06 <apfelkuchen@hrnz.li>2023-04-16 06:06:22 +0200
commit20761c31d02d1d571772045bf403910b2098fc6a (patch)
tree10ebde771a96cc5fdd264a5bf365a2d146a7ba1e /pkgs/os-specific/linux/jool
parent2abbfae038bfed20fec70280fb5e119a093a387c (diff)
jool-cli: fix build
prior to this, building with iptables-1.8.9 failed with

> make[2]: Entering directory '/tmp/nix-shell.okX50g/tmp.O3HX8QruLZ/source/src/usr/iptables'
> gcc -Wall -pedantic -std=gnu11 -O2 -I../.. -I/nix/store/h6saqb0001ps7mwi1c40m90f53af1hpj-iptables-1.8.9-dev/include   -D_INIT=libxt_JOOL_SIIT_init -fPIC -c -o libxt_JOOL_SIIT.o libxt_JOOL_SIIT.c;
> gcc -shared -fPIC  -o libxt_JOOL_SIIT.so libxt_JOOL_SIIT.o;
> /nix/store/f4qnwzv6y0nq8lix33jr5ykkyybs6fxf-binutils-2.40/bin/ld: libxt_JOOL_SIIT.o: in function `_init':
> libxt_JOOL_SIIT.c:(.text+0x150): multiple definition of `_init'; /nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/crti.o:(.init+0x0): first defined here
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile:37: libxt_JOOL_SIIT.so] Error 1

This adds the upstream fix from https://github.com/NICMx/Jool/commit/490ddb0933061cab3c2a7952dffc61789deed565
Diffstat (limited to 'pkgs/os-specific/linux/jool')
-rw-r--r--pkgs/os-specific/linux/jool/cli.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/jool/cli.nix b/pkgs/os-specific/linux/jool/cli.nix
index dbcf9522e723c..67e1575ff7e9f 100644
--- a/pkgs/os-specific/linux/jool/cli.nix
+++ b/pkgs/os-specific/linux/jool/cli.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libnl, iptables }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libnl, iptables }:
 
 let
   sourceAttrs = (import ./source.nix) { inherit fetchFromGitHub; };
@@ -10,6 +10,11 @@ stdenv.mkDerivation {
 
   src = sourceAttrs.src;
 
+  patches = [ (fetchpatch {
+    url = "https://github.com/NICMx/Jool/commit/490ddb0933061cab3c2a7952dffc61789deed565.patch";
+    hash = "sha256-1dpMth0ocPHujlk+96St1a63RipcWiL/CdmSz4O87Lg=";
+  }) ];
+
   outputs = [
     "out"
     "man"