2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2020-06-30 14:08:22 +00:00
|
|
|
, fetchurl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, ncurses
|
|
|
|
, python3
|
|
|
|
, cunit
|
|
|
|
, dpdk
|
|
|
|
, libaio
|
|
|
|
, libbsd
|
|
|
|
, libuuid
|
|
|
|
, numactl
|
|
|
|
, openssl
|
|
|
|
}:
|
2018-05-21 01:59:30 +00:00
|
|
|
|
2021-05-24 06:22:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "spdk";
|
2021-08-18 01:23:21 +00:00
|
|
|
version = "21.07";
|
2018-05-21 01:59:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spdk";
|
|
|
|
repo = "spdk";
|
|
|
|
rev = "v${version}";
|
2021-08-18 01:23:21 +00:00
|
|
|
sha256 = "sha256-/hynuYVdzIfiHUUfuuOY8SBJ18DqJr2Fos2JjQQVvbg=";
|
2018-05-21 01:59:30 +00:00
|
|
|
};
|
|
|
|
|
2020-06-30 14:08:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3
|
|
|
|
];
|
2018-05-21 01:59:30 +00:00
|
|
|
|
2020-06-30 14:08:22 +00:00
|
|
|
buildInputs = [
|
|
|
|
cunit dpdk libaio libbsd libuuid numactl openssl ncurses
|
|
|
|
];
|
2018-05-21 01:59:30 +00:00
|
|
|
|
2018-05-21 03:39:54 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2018-05-21 01:59:30 +00:00
|
|
|
configureFlags = [ "--with-dpdk=${dpdk}" ];
|
|
|
|
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
|
2021-05-24 06:22:01 +00:00
|
|
|
# otherwise does not find strncpy when compiling
|
|
|
|
NIX_LDFLAGS = "-lbsd";
|
2018-05-21 01:59:30 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2018-05-21 01:59:30 +00:00
|
|
|
description = "Set of libraries for fast user-mode storage";
|
2019-05-13 05:16:35 +00:00
|
|
|
homepage = "https://spdk.io/";
|
2018-05-21 01:59:30 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|