File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 1
1
{ stdenv , lib , haskellLib , buildPackages } :
2
- let self = drv :
2
+ let self = drvOrig :
3
3
4
4
let
5
+ # Work around problem running dynamicially linked Android executables with qemu.
6
+ drv = drvOrig . override ( lib . optionalAttrs stdenv . hostPlatform . isAndroid { setupBuildFlags = [ "--ghc-option=-optl-static" ] ; } ) ;
7
+
5
8
component = drv . config ;
6
9
7
10
# This derivation can be used to execute test component.
@@ -65,4 +68,4 @@ in stdenv.mkDerivation ((
65
68
}
66
69
// lib . optionalAttrs ( drv ? LOCALE_ARCHIVE ) { inherit ( drv ) LOCALE_ARCHIVE ; }
67
70
) ;
68
- in self
71
+ in self
Original file line number Diff line number Diff line change 68
68
# Also for GHC #15275
69
69
++ lib . optionals hostPlatform . isAarch64 [ "--gcc-option=-fPIC" ] ;
70
70
71
- # Wrapper to output a warning for Android
72
- qemuNotSupportedWarning = writeShellScriptBin "warning-wrapper" ''
73
- echo "Warning: Running Android apps on Linux using qemu is not supported." >&2
74
- '' ;
75
-
76
71
# Wrapper for qemu testing
77
72
qemuTestWrapper = writeShellScriptBin "test-wrapper" ''
78
73
set -euo pipefail
79
74
${ qemu } /bin/qemu-${ qemuSuffix } $@*
80
75
'' ;
81
76
82
77
# Choose the appropriate test wrapper
83
- testWrapper = lib . optional isLinuxCross
84
- ( if hostPlatform . isAndroid
85
- then "${ qemuNotSupportedWarning } /bin/warning-wrapper"
86
- else "${ qemuTestWrapper } /bin/test-wrapper" ) ;
78
+ testWrapper = lib . optional isLinuxCross "${ qemuTestWrapper } /bin/test-wrapper" ;
87
79
88
80
enableShared = lib . mkDefault ( ! isLinuxCross ) ;
89
81
You can’t perform that action at this time.
0 commit comments