File tree Expand file tree Collapse file tree
pkgs/development/compilers/ghc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -342,12 +342,17 @@ stdenv.mkDerivation {
342342 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${ libiconv } /lib@" {} \;
343343 ''
344344 +
345- # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
345+ # Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
346346 # FFI_LIB_DIR is a good indication of places it must be needed.
347- lib . optionalString ( stdenv . hostPlatform . isLinux && stdenv . hostPlatform . isAarch64 ) ''
348- find . -name package.conf.in \
349- -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${ numactl . out } /lib@g" {} \;
350- ''
347+ lib . optionalString
348+ (
349+ lib . meta . availableOn stdenv . hostPlatform numactl
350+ && builtins . any ( { nixPackage , ... } : nixPackage == numactl ) binDistUsed . archSpecificLibraries
351+ )
352+ ''
353+ find . -name package.conf.in \
354+ -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${ numactl . out } /lib@g" {} \;
355+ ''
351356 +
352357 # Rename needed libraries and binaries, fix interpreter
353358 lib . optionalString stdenv . hostPlatform . isLinux ''
Original file line number Diff line number Diff line change @@ -311,12 +311,17 @@ stdenv.mkDerivation {
311311 -i {} \;
312312 ''
313313 +
314- # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
314+ # Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
315315 # FFI_LIB_DIR is a good indication of places it must be needed.
316- lib . optionalString ( stdenv . hostPlatform . isLinux && stdenv . hostPlatform . isAarch64 ) ''
317- find . -name package.conf.in \
318- -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${ numactl . out } /lib@g" {} \;
319- ''
316+ lib . optionalString
317+ (
318+ lib . meta . availableOn stdenv . hostPlatform numactl
319+ && builtins . any ( { nixPackage , ... } : nixPackage == numactl ) binDistUsed . archSpecificLibraries
320+ )
321+ ''
322+ find . -name package.conf.in \
323+ -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${ numactl . out } /lib@g" {} \;
324+ ''
320325 +
321326 # Rename needed libraries and binaries, fix interpreter
322327 lib . optionalString stdenv . hostPlatform . isLinux ''
Original file line number Diff line number Diff line change @@ -297,12 +297,17 @@ stdenv.mkDerivation {
297297 -i {} \;
298298 ''
299299 +
300- # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
300+ # Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
301301 # FFI_LIB_DIR is a good indication of places it must be needed.
302- lib . optionalString ( stdenv . hostPlatform . isLinux && stdenv . hostPlatform . isAarch64 ) ''
303- find . -name package.conf.in \
304- -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${ numactl . out } /lib@g" {} \;
305- ''
302+ lib . optionalString
303+ (
304+ lib . meta . availableOn stdenv . hostPlatform numactl
305+ && builtins . any ( { nixPackage , ... } : nixPackage == numactl ) binDistUsed . archSpecificLibraries
306+ )
307+ ''
308+ find . -name package.conf.in \
309+ -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${ numactl . out } /lib@g" {} \;
310+ ''
306311 +
307312 # Rename needed libraries and binaries, fix interpreter
308313 lib . optionalString stdenv . hostPlatform . isLinux ''
Original file line number Diff line number Diff line change @@ -311,12 +311,17 @@ stdenv.mkDerivation {
311311 -i {} \;
312312 ''
313313 +
314- # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
314+ # Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
315315 # FFI_LIB_DIR is a good indication of places it must be needed.
316- lib . optionalString ( stdenv . hostPlatform . isLinux && stdenv . hostPlatform . isAarch64 ) ''
317- find . -name package.conf.in \
318- -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${ numactl . out } /lib@g" {} \;
319- ''
316+ lib . optionalString
317+ (
318+ lib . meta . availableOn stdenv . hostPlatform numactl
319+ && builtins . any ( { nixPackage , ... } : nixPackage == numactl ) binDistUsed . archSpecificLibraries
320+ )
321+ ''
322+ find . -name package.conf.in \
323+ -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${ numactl . out } /lib@g" {} \;
324+ ''
320325 +
321326 # Rename needed libraries and binaries, fix interpreter
322327 lib . optionalString stdenv . hostPlatform . isLinux ''
You can’t perform that action at this time.
0 commit comments