2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-07-18 16:06:22 +00:00
|
|
|
, fetchurl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, ncurses
|
|
|
|
, python3
|
|
|
|
, cunit
|
|
|
|
, dpdk
|
|
|
|
, libaio
|
|
|
|
, libbsd
|
|
|
|
, libuuid
|
|
|
|
, numactl
|
|
|
|
, openssl
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "spdk";
|
2021-10-11 16:52:03 +00:00
|
|
|
version = "21.07";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spdk";
|
|
|
|
repo = "spdk";
|
|
|
|
rev = "v${version}";
|
2021-10-11 16:52:03 +00:00
|
|
|
sha256 = "sha256-/hynuYVdzIfiHUUfuuOY8SBJ18DqJr2Fos2JjQQVvbg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
buildInputs = [
|
|
|
|
cunit dpdk libaio libbsd libuuid numactl openssl ncurses
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--with-dpdk=${dpdk}" ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
|
2021-05-28 09:39:13 +00:00
|
|
|
# otherwise does not find strncpy when compiling
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|