diff options
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/bridge-utils')
-rw-r--r-- | nixpkgs/pkgs/os-specific/linux/bridge-utils/autoconf-ar.patch | 21 | ||||
-rw-r--r-- | nixpkgs/pkgs/os-specific/linux/bridge-utils/default.nix | 31 |
2 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/bridge-utils/autoconf-ar.patch b/nixpkgs/pkgs/os-specific/linux/bridge-utils/autoconf-ar.patch new file mode 100644 index 000000000000..21b089179ce1 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/bridge-utils/autoconf-ar.patch @@ -0,0 +1,21 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -9,6 +9,7 @@ dnl Checks for programs. + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_RANLIB ++AC_CHECK_TOOL([AR], [ar]) + + dnl Checks for header files. + AC_HEADER_STDC +--- a/libbridge/Makefile.in ++++ b/libbridge/Makefile.in +@@ -1,7 +1,7 @@ + + KERNEL_HEADERS=-I@KERNEL_HEADERS@ + +-AR=ar ++AR=@AR@ + RANLIB=@RANLIB@ + + CC=@CC@ diff --git a/nixpkgs/pkgs/os-specific/linux/bridge-utils/default.nix b/nixpkgs/pkgs/os-specific/linux/bridge-utils/default.nix new file mode 100644 index 000000000000..1753be599380 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/bridge-utils/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchurl, autoreconfHook, fetchpatch }: + +stdenv.mkDerivation rec { + pname = "bridge-utils"; + version = "1.7.1"; + + src = fetchurl { + url = "https://kernel.org/pub/linux/utils/net/bridge-utils/bridge-utils-${version}.tar.xz"; + sha256 = "sha256-ph2L5PGhQFxgyO841UTwwYwFszubB+W0sxAzU2Fl5g4="; + }; + + patches = [ + ./autoconf-ar.patch + + (fetchpatch { + name = "musl-includes.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/bridge-utils/fix-PATH_MAX-on-ppc64le.patch?id=12c9046eee3a0a35665dc4e280c1f5ae2af5845d"; + sha256 = "sha256-uY1tgJhcm1DFctg9scmC8e+mgowgz4f/oF0+k+x+jqw="; + }) + ]; + + nativeBuildInputs = [ autoreconfHook ]; + + meta = { + description = "An userspace tool to configure linux bridges (deprecated in favour or iproute2)."; + mainProgram = "brctl"; + homepage = "https://wiki.linuxfoundation.org/networking/bridge"; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + }; +} |