summary refs log tree commit diff
path: root/pkgs/development/libraries/spdk
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2019-12-23 06:51:39 +0000
committerOrivej Desh <orivej@gmx.fr>2019-12-30 16:50:40 +0000
commit14caf0fdaaf1556ea2fe6e631f448562fb743992 (patch)
tree51140270a36c42f8e45276084969a685a7124bf4 /pkgs/development/libraries/spdk
parent17884f7b151a9f71ddf2c43d2d85fe5e336ee7c1 (diff)
downloadnixpkgs-14caf0fdaaf1556ea2fe6e631f448562fb743992.tar
nixpkgs-14caf0fdaaf1556ea2fe6e631f448562fb743992.tar.gz
nixpkgs-14caf0fdaaf1556ea2fe6e631f448562fb743992.tar.bz2
nixpkgs-14caf0fdaaf1556ea2fe6e631f448562fb743992.tar.lz
nixpkgs-14caf0fdaaf1556ea2fe6e631f448562fb743992.tar.xz
nixpkgs-14caf0fdaaf1556ea2fe6e631f448562fb743992.tar.zst
nixpkgs-14caf0fdaaf1556ea2fe6e631f448562fb743992.zip
spdk: 19.04 -> 19.10, fix build with mesonified dpdk
Diffstat (limited to 'pkgs/development/libraries/spdk')
-rw-r--r--pkgs/development/libraries/spdk/default.nix10
-rw-r--r--pkgs/development/libraries/spdk/spdk-dpdk-meson.patch17
2 files changed, 23 insertions, 4 deletions
diff --git a/pkgs/development/libraries/spdk/default.nix b/pkgs/development/libraries/spdk/default.nix
index a18edc0a6df..e70980afac6 100644
--- a/pkgs/development/libraries/spdk/default.nix
+++ b/pkgs/development/libraries/spdk/default.nix
@@ -1,19 +1,21 @@
-{ stdenv, fetchFromGitHub, python, cunit, dpdk, libaio, libuuid, numactl, openssl }:
+{ stdenv, fetchFromGitHub, python, cunit, dpdk, libaio, libbsd, libuuid, numactl, openssl }:
 
 stdenv.mkDerivation rec {
   pname = "spdk";
-  version = "19.04";
+  version = "19.10";
 
   src = fetchFromGitHub {
     owner = "spdk";
     repo = "spdk";
     rev = "v${version}";
-    sha256 = "10mzal1hspnh26ws5d7sc54gyjfzkf6amr0gkd7b368ng2a9z8s6";
+    sha256 = "16v2vswn3rnnj7ak5w5rsak6r8f9b85gyhyll4ac1k4xpyj488hj";
   };
 
+  patches = [ ./spdk-dpdk-meson.patch ];
+
   nativeBuildInputs = [ python ];
 
-  buildInputs = [ cunit dpdk libaio libuuid numactl openssl ];
+  buildInputs = [ cunit dpdk libaio libbsd libuuid numactl openssl ];
 
   postPatch = ''
     patchShebangs .
diff --git a/pkgs/development/libraries/spdk/spdk-dpdk-meson.patch b/pkgs/development/libraries/spdk/spdk-dpdk-meson.patch
new file mode 100644
index 00000000000..9cc6d89ce50
--- /dev/null
+++ b/pkgs/development/libraries/spdk/spdk-dpdk-meson.patch
@@ -0,0 +1,17 @@
+1. dpdk built with meson generates rte_build_config.h rather than rte_config.h.
+2. dpdk configured with libbsd requires that dependents link with libbsd.
+
+--- a/lib/env_dpdk/env.mk
++++ b/lib/env_dpdk/env.mk
+@@ -140,6 +140,9 @@ endif
+ 
+-ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_config.h))
+-ifneq (,$(shell grep -e "define RTE_LIBRTE_VHOST_NUMA 1" -e "define RTE_EAL_NUMA_AWARE_HUGEPAGES 1" $(DPDK_INC_DIR)/rte_config.h))
++ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_build_config.h))
++ifneq (,$(shell grep -e "define RTE_LIBRTE_VHOST_NUMA 1" -e "define RTE_EAL_NUMA_AWARE_HUGEPAGES 1" $(DPDK_INC_DIR)/rte_build_config.h))
+ ENV_LINKER_ARGS += -lnuma
+ endif
++ifneq (,$(shell grep -e "define RTE_USE_LIBBSD 1" $(DPDK_INC_DIR)/rte_build_config.h))
++ENV_LINKER_ARGS += -lbsd
++endif
+ endif