Created
March 1, 2022 20:06
-
-
Save macros/ef20b110f80a6ee5dafcb6451f3d3885 to your computer and use it in GitHub Desktop.
Miniupnpd with nftables override
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rebuild the package with nftables support | |
# Module expects scripts named iptables_ so copy nft versions to those names | |
nixpkgs.config.packageOverrides = pkgs: { | |
miniupnpd = pkgs.miniupnpd.overrideAttrs (o:{ | |
buildInputs = o.buildInputs ++ [ pkgs.libmnl pkgs.libnftnl pkgs.openssl ]; | |
makefile = "Makefile.linux_nft"; | |
configureFlags = [ "--firewall=nftables" ]; | |
postFixup = '' | |
cp $out/etc/miniupnpd/nft_init.sh $out/etc/miniupnpd/iptables_init.sh | |
cp $out/etc/miniupnpd/nft_removeall.sh $out/etc/miniupnpd/iptables_removeall.sh | |
for script in $out/etc/miniupnpd/{nft,iptables}_{init,removeall}.sh | |
do | |
wrapProgram $script --set PATH '${scriptBinEnv}:$PATH' | |
done | |
''; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment