···
ensureNewerSourcesForZipFilesHook,
29
+
# downgrade dpdk because spdk refuses newer versions at runtime
30
+
# url: https://github.com/spdk/spdk/blob/3e3577a090ed9a084b5909aadcc8bc5fe93c0017/lib/env_dpdk/pci_dpdk.c#L77
31
+
dpdk' = dpdk.overrideAttrs (oldAttrs: rec {
34
+
url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
35
+
sha256 = "sha256-akCnMTKChuvXloWxj/pZkua3cME4Q9Zf0NEVfPzP9j0=";
stdenv.mkDerivation rec {
34
-
hash = "sha256-27mbIycenOk51PLQrAfU1cZcjiWddNtxoyC6Q9wxqFg=";
49
+
hash = "sha256-Js78FLkLN4GpJlgO+h4jIiEdThciBugbLTB6elFi2TI=";
41
-
python3.pkgs.setuptools
56
+
python3.pkgs.hatchling
···
···
73
-
# can be removed again with next release, check is already in master
74
-
substituteInPlace module/scheduler/dpdk_governor/dpdk_governor.c \
75
-
--replace-fail "<rte_power.h>" " <rte_power_cpufreq.h>"
87
+
# Override pip install command to use hatchling directly without downloading dependencies
88
+
substituteInPlace python/Makefile \
89
+
--replace-fail "setup_cmd = pip install --prefix=\$(CONFIG_PREFIX)" \
90
+
"setup_cmd = python3 -m pip install --no-deps --no-build-isolation --prefix=\$(CONFIG_PREFIX)"
enableParallelBuilding = true;
81
-
"--with-dpdk=${dpdk}"
96
+
"--with-dpdk=${dpdk'}"
98
+
++ lib.optional (!stdenv.hostPlatform.isStatic) "--with-shared";
100
+
# spdk does shenanigans with patchelf, so we need to stop them from messing with rpath
102
+
patchelf() { true; }
109
+
# SPDK scripts assume that they can read the includes also relative to the scripts.
110
+
# Therefore we are not copying them into $out/share.
112
+
cp ./scripts/common.sh ./scripts/setup.sh $out/scripts
113
+
cat > $out/bin/spdk-setup << EOF
115
+
exec $out/scripts/setup.sh "\$@"
117
+
chmod +x $out/bin/spdk-setup
···
126
+
${lib.optionalString (!stdenv.hostPlatform.isStatic) ''
127
+
# .pc files are not working properly with static linking and might just confuse other build systems
env.NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
93
-
# otherwise does not find strncpy when compiling
94
-
env.NIX_LDFLAGS = "-lbsd";
134
+
passthru.dpdk = dpdk';
description = "Set of libraries for fast user-mode storage";