haskell.compiler.ghc*Binary: detect -lnuma based on library list
This is more robust when new bindists are added to expressions since no additional conditional needs to be updated.
This commit is contained in:
parent
a0d0ba9ef3
commit
3c3fef04a2
@ -342,12 +342,17 @@ stdenv.mkDerivation {
|
|||||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
|
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
|
||||||
''
|
''
|
||||||
+
|
+
|
||||||
# aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
# Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
||||||
# FFI_LIB_DIR is a good indication of places it must be needed.
|
# FFI_LIB_DIR is a good indication of places it must be needed.
|
||||||
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
|
lib.optionalString
|
||||||
find . -name package.conf.in \
|
(
|
||||||
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
lib.meta.availableOn stdenv.hostPlatform numactl
|
||||||
''
|
&& builtins.any ({ nixPackage, ... }: nixPackage == numactl) binDistUsed.archSpecificLibraries
|
||||||
|
)
|
||||||
|
''
|
||||||
|
find . -name package.conf.in \
|
||||||
|
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
||||||
|
''
|
||||||
+
|
+
|
||||||
# Rename needed libraries and binaries, fix interpreter
|
# Rename needed libraries and binaries, fix interpreter
|
||||||
lib.optionalString stdenv.hostPlatform.isLinux ''
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
|
|||||||
@ -311,12 +311,17 @@ stdenv.mkDerivation {
|
|||||||
-i {} \;
|
-i {} \;
|
||||||
''
|
''
|
||||||
+
|
+
|
||||||
# aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
# Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
||||||
# FFI_LIB_DIR is a good indication of places it must be needed.
|
# FFI_LIB_DIR is a good indication of places it must be needed.
|
||||||
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
|
lib.optionalString
|
||||||
find . -name package.conf.in \
|
(
|
||||||
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
lib.meta.availableOn stdenv.hostPlatform numactl
|
||||||
''
|
&& builtins.any ({ nixPackage, ... }: nixPackage == numactl) binDistUsed.archSpecificLibraries
|
||||||
|
)
|
||||||
|
''
|
||||||
|
find . -name package.conf.in \
|
||||||
|
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
||||||
|
''
|
||||||
+
|
+
|
||||||
# Rename needed libraries and binaries, fix interpreter
|
# Rename needed libraries and binaries, fix interpreter
|
||||||
lib.optionalString stdenv.hostPlatform.isLinux ''
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
|
|||||||
@ -297,12 +297,17 @@ stdenv.mkDerivation {
|
|||||||
-i {} \;
|
-i {} \;
|
||||||
''
|
''
|
||||||
+
|
+
|
||||||
# aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
# Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
||||||
# FFI_LIB_DIR is a good indication of places it must be needed.
|
# FFI_LIB_DIR is a good indication of places it must be needed.
|
||||||
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
|
lib.optionalString
|
||||||
find . -name package.conf.in \
|
(
|
||||||
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
lib.meta.availableOn stdenv.hostPlatform numactl
|
||||||
''
|
&& builtins.any ({ nixPackage, ... }: nixPackage == numactl) binDistUsed.archSpecificLibraries
|
||||||
|
)
|
||||||
|
''
|
||||||
|
find . -name package.conf.in \
|
||||||
|
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
||||||
|
''
|
||||||
+
|
+
|
||||||
# Rename needed libraries and binaries, fix interpreter
|
# Rename needed libraries and binaries, fix interpreter
|
||||||
lib.optionalString stdenv.hostPlatform.isLinux ''
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
|
|||||||
@ -311,12 +311,17 @@ stdenv.mkDerivation {
|
|||||||
-i {} \;
|
-i {} \;
|
||||||
''
|
''
|
||||||
+
|
+
|
||||||
# aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
# Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
||||||
# FFI_LIB_DIR is a good indication of places it must be needed.
|
# FFI_LIB_DIR is a good indication of places it must be needed.
|
||||||
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
|
lib.optionalString
|
||||||
find . -name package.conf.in \
|
(
|
||||||
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
lib.meta.availableOn stdenv.hostPlatform numactl
|
||||||
''
|
&& builtins.any ({ nixPackage, ... }: nixPackage == numactl) binDistUsed.archSpecificLibraries
|
||||||
|
)
|
||||||
|
''
|
||||||
|
find . -name package.conf.in \
|
||||||
|
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
||||||
|
''
|
||||||
+
|
+
|
||||||
# Rename needed libraries and binaries, fix interpreter
|
# Rename needed libraries and binaries, fix interpreter
|
||||||
lib.optionalString stdenv.hostPlatform.isLinux ''
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user