Commit 256c518a authored by Arthur Gautier's avatar Arthur Gautier Committed by Jörg Thalheim
Browse files

dpdk: fixup shared compilation

Dpdk build will default to static linking of its libraries if
`default_library` option is not specified. When shared is expected, we
should explicitely set the `default_library` option to `shared`.

This saves 586MB on the derivation output size:
```
95M	/nix/store/qydxxmcnh1w8yz58n36345kg3siimqip-dpdk-22.11.1
681M	/nix/store/pxvc5r3jvba1i96cma36akr7cnvnac3w-dpdk-22.11.1
```
parent e4507e79
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ in stdenv.mkDerivation rec {
  ]
  # kni kernel driver is currently not compatble with 5.11
  ++ lib.optional (mod && kernel.kernelOlder "5.11") "-Ddisable_drivers=kni"
  ++ lib.optional (!shared) "-Ddefault_library=static"
  ++ [(if shared then "-Ddefault_library=shared" else "-Ddefault_library=static")]
  ++ lib.optional (machine != null) "-Dmachine=${machine}"
  ++ lib.optional mod "-Dkernel_dir=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
  ++ lib.optional (withExamples != []) "-Dexamples=${builtins.concatStringsSep "," withExamples}";