2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-07-18 16:06:22 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, ncurses
|
|
|
|
, python3
|
|
|
|
, cunit
|
|
|
|
, dpdk
|
2024-06-05 15:53:02 +00:00
|
|
|
, fuse3
|
2020-07-18 16:06:22 +00:00
|
|
|
, libaio
|
|
|
|
, libbsd
|
|
|
|
, libuuid
|
|
|
|
, numactl
|
|
|
|
, openssl
|
2023-11-16 04:20:00 +00:00
|
|
|
, pkg-config
|
|
|
|
, zlib
|
2024-04-21 15:54:59 +00:00
|
|
|
, zstd
|
2023-11-16 04:20:00 +00:00
|
|
|
, libpcap
|
|
|
|
, libnl
|
2024-04-21 15:54:59 +00:00
|
|
|
, elfutils
|
2023-11-16 04:20:00 +00:00
|
|
|
, 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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "24.01";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spdk";
|
|
|
|
repo = "spdk";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-5znYELR6WvVXbfFKAcRtJnSwAE5WHmA8v1rvZUtszS4=";
|
2023-11-16 04:20:00 +00:00
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3
|
2024-06-05 15:53:02 +00:00
|
|
|
python3.pkgs.pip
|
2023-11-16 04:20:00 +00:00
|
|
|
python3.pkgs.setuptools
|
2024-06-05 15:53:02 +00:00
|
|
|
python3.pkgs.wheel
|
|
|
|
python3.pkgs.wrapPython
|
2023-11-16 04:20:00 +00:00
|
|
|
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
|
2024-06-05 15:53:02 +00:00
|
|
|
fuse3
|
2023-11-16 04:20:00 +00:00
|
|
|
jansson
|
|
|
|
libaio
|
|
|
|
libbsd
|
2024-04-21 15:54:59 +00:00
|
|
|
elfutils
|
2023-11-16 04:20:00 +00:00
|
|
|
libuuid
|
|
|
|
libpcap
|
|
|
|
libnl
|
|
|
|
numactl
|
|
|
|
openssl
|
|
|
|
ncurses
|
|
|
|
zlib
|
2024-04-21 15:54:59 +00:00
|
|
|
zstd
|
2023-11-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
python3.pkgs.configshell
|
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}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postCheck = ''
|
|
|
|
python3 -m spdk
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|