at 16.09-beta 34 lines 858 B view raw
1{ stdenv, fetchzip, kernel }: 2 3let 4 sourceAttrs = (import ./source.nix) { inherit fetchzip; }; 5in 6 7stdenv.mkDerivation { 8 name = "jool-${sourceAttrs.version}-${kernel.version}"; 9 10 src = sourceAttrs.src; 11 12 hardeningDisable = [ "pic" ]; 13 14 prePatch = '' 15 sed -e 's@/lib/modules/\$(.*)@${kernel.dev}/lib/modules/${kernel.modDirVersion}@' -i mod/*/Makefile 16 ''; 17 18 buildPhase = '' 19 make -C mod 20 ''; 21 22 installPhase = '' 23 make -C mod modules_install INSTALL_MOD_PATH=$out 24 ''; 25 26 meta = with stdenv.lib; { 27 homepage = https://www.jool.mx/; 28 description = "Fairly compliant SIIT and Stateful NAT64 for Linux - kernel modules"; 29 platforms = platforms.linux; 30 maintainers = with maintainers; [ fpletz ]; 31 # kernel version 4.3 is the most recent supported version 32 broken = builtins.compareVersions kernel.version "4.3" == 1; 33 }; 34}