Subject: [bug#67017] [PATCH v2] gnu: Add iptables-nft.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 26 Nov 2023 23:34:22 +0100

Hi,

Hilton Chain <[email-masked]> skribis:

> * gnu/packages/linux.scm (iptables-nft): New variable.
>
> Change-Id: I281514fcf05e70b4d62f374269c50c76bb676f78

[...]

> +(define-public iptables-nft
> +  (package
> +    (inherit iptables)
> +    (name "iptables-nft")
> +    (source #f)
> +    (build-system copy-build-system)
> +    (arguments
> +     (list
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (delete 'unpack)
> +          (replace 'install
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (for-each
> +               (lambda (command-path)
> +                 (let ((link-path (string-append #$output command-path)))
> +                   (mkdir-p (dirname link-path))
> +                   (symlink (search-input-file inputs "sbin/xtables-nft-multi")
> +                            link-path)))
> +               (apply append
> +                      '("/bin/iptables-xml")
> +                      (map (lambda (xtables)
> +                             (list (string-append "/sbin/" xtables)
> +                                   (string-append "/sbin/" xtables "-restore")
> +                                   (string-append "/sbin/" xtables "-save")))
> +                           '("arptables"
> +                             "ebtables"
> +                             "iptables"
> +                             "ip6tables")))))))))
> +    (inputs (list iptables))
> +    (native-inputs '())))

I think we at least need ‘synopsis’ to clarify what this is about
compared to ‘iptables’.

Apart from that it LGTM, thanks!

Ludo’.