2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-07-18 16:06:22 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, ncurses
|
|
|
|
, python3
|
|
|
|
, cunit
|
|
|
|
, dpdk
|
|
|
|
, libaio
|
|
|
|
, libbsd
|
|
|
|
, libuuid
|
|
|
|
, numactl
|
|
|
|
, openssl
|
2023-11-16 04:20:00 +00:00
|
|
|
, pkg-config
|
|
|
|
, zlib
|
|
|
|
, libpcap
|
|
|
|
, libnl
|
|
|
|
, libelf
|
|
|
|
, jansson
|
|
|
|
, ensureNewerSourcesForZipFilesHook
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "spdk";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
version = "23.09";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spdk";
|
|
|
|
repo = "spdk";
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-P10NDa+MIEY8B3bu34Dq2keyuv2a24XV5Wf+Ah701b8=";
|
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3
|
2023-11-16 04:20:00 +00:00
|
|
|
python3.pkgs.setuptools
|
|
|
|
pkg-config
|
|
|
|
ensureNewerSourcesForZipFilesHook
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
buildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
cunit
|
|
|
|
dpdk
|
|
|
|
jansson
|
|
|
|
libaio
|
|
|
|
libbsd
|
|
|
|
libelf
|
|
|
|
libuuid
|
|
|
|
libpcap
|
|
|
|
libnl
|
|
|
|
numactl
|
|
|
|
openssl
|
|
|
|
ncurses
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# https://review.spdk.io/gerrit/c/spdk/spdk/+/20394
|
|
|
|
./setuptools.patch
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-dpdk=${dpdk}"
|
|
|
|
"--pydir=${placeholder "out"}/${python3.sitePackages}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
|
2021-05-28 09:39:13 +00:00
|
|
|
# otherwise does not find strncpy when compiling
|
2023-11-16 04:20:00 +00:00
|
|
|
env.NIX_LDFLAGS = "-lbsd";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Set of libraries for fast user-mode storage";
|
|
|
|
homepage = "https://spdk.io/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|