From 90a9d02538bbac2b7a7e911b2db8a60874dd139d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 30 Jun 2020 11:40:58 +0100 Subject: [PATCH 1/2] dpdk: 19.11 -> 20.05 support for newer kernels (5.7) --- pkgs/os-specific/linux/dpdk/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index 8ad703bdd4b6..aacbc3cdfbe2 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -11,11 +11,11 @@ let in stdenv.mkDerivation rec { name = "dpdk-${version}" + lib.optionalString mod "-${kernel.version}"; - version = "19.11"; + version = "20.05"; src = fetchurl { url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; - sha256 = "1aqjn6bm9miv3v2rbqi1rh1c19wa8nip9fvnqaqpnrs3i2b36wa6"; + sha256 = "0h0xv2zwb91b9n29afg5ihn06a8q28in64hag2f112kc19f79jj8"; }; nativeBuildInputs = [ @@ -38,7 +38,7 @@ in stdenv.mkDerivation rec { ] ++ lib.optionals mod kernel.moduleBuildDependencies; postPatch = '' - patchShebangs config/arm + patchShebangs config/arm buildtools ''; mesonFlags = [ From 5c62e72f2b6227711cbc788dd37d25cefbfe36bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 30 Jun 2020 15:08:22 +0100 Subject: [PATCH 2/2] spdk: 20.01.1 -> 20.04.1 --- pkgs/development/libraries/spdk/default.nix | 44 +++++++++++++++++---- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/spdk/default.nix b/pkgs/development/libraries/spdk/default.nix index e8d4f3eb4e07..1b5abe16f370 100644 --- a/pkgs/development/libraries/spdk/default.nix +++ b/pkgs/development/libraries/spdk/default.nix @@ -1,24 +1,54 @@ -{ stdenv, fetchFromGitHub, python, cunit, dpdk, libaio, libbsd, libuuid, numactl, openssl }: +{ stdenv +, fetchurl +, fetchFromGitHub +, fetchpatch +, ncurses +, python3 +, cunit +, dpdk +, libaio +, libbsd +, libuuid +, numactl +, openssl +}: -stdenv.mkDerivation rec { +let + dpdk-compat-patch = fetchurl { + url = "https://review.spdk.io/gerrit/plugins/gitiles/spdk/spdk/+/6acb9a58755856fb9316baf9dbbb7239dc6b9446%5E%21/?format=TEXT"; + sha256 = "18q0956fkjw19r29hp16x4pygkfv01alj9cld2wlqqyfgp41nhn0"; + }; +in stdenv.mkDerivation rec { pname = "spdk"; - version = "20.01.1"; + version = "20.04.1"; src = fetchFromGitHub { owner = "spdk"; repo = "spdk"; rev = "v${version}"; - sha256 = "1ci0kj0bv5jp5yipa8g0q0ah71qv6pjvvban1ad0v24f7lq4xh0w"; + sha256 = "ApMyGamPrMalzZLbVkJlcwatiB8dOJmoxesdjkWZElk="; }; - patches = [ ./spdk-dpdk-meson.patch ]; + patches = [ + ./spdk-dpdk-meson.patch + # https://review.spdk.io/gerrit/c/spdk/spdk/+/3134 + (fetchpatch { + url = "https://github.com/spdk/spdk/commit/c954b5b722c5c163774d3598458ff726c48852ab.patch"; + sha256 = "1n149hva5qxmpr0nmav10nya7zklafxi136f809clv8pag84g698"; + }) + ]; - nativeBuildInputs = [ python ]; + nativeBuildInputs = [ + python3 + ]; - buildInputs = [ cunit dpdk libaio libbsd libuuid numactl openssl ]; + buildInputs = [ + cunit dpdk libaio libbsd libuuid numactl openssl ncurses + ]; postPatch = '' patchShebangs . + base64 -d ${dpdk-compat-patch} | patch -p1 ''; configureFlags = [ "--with-dpdk=${dpdk}" ];