nix: test script without glibc locales
glibcLocales is not available e.g. on darwin. This change allows running various dev tools on darwin, and other theoretical non-glibc systems.
This commit is contained in:
+11
-3
@@ -3,13 +3,16 @@
|
||||
, checkedShellScript
|
||||
, devCabalOptions
|
||||
, ghc
|
||||
, glibcLocales
|
||||
, glibcLocales ? null
|
||||
, gnugrep
|
||||
, hpc-codecov
|
||||
, hostPlatform
|
||||
, jq
|
||||
, lib
|
||||
, postgrest
|
||||
, python3
|
||||
, runtimeShell
|
||||
, stdenv
|
||||
, weeder
|
||||
, withTools
|
||||
, yq
|
||||
@@ -125,9 +128,13 @@ let
|
||||
withEnv = postgrest.env;
|
||||
withTmpDir = true;
|
||||
}
|
||||
''
|
||||
(
|
||||
# required for `hpc markup` in CI; glibcLocales is not available e.g. on Darwin
|
||||
lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
|
||||
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
|
||||
'' +
|
||||
|
||||
''
|
||||
# clean up previous coverage reports
|
||||
mkdir -p coverage
|
||||
rm -rf coverage/*
|
||||
@@ -185,7 +192,8 @@ let
|
||||
echo "file://$(pwd)/coverage/hpc_index.html"
|
||||
${ghc}/bin/hpc report coverage/postgrest.tix "''${_arg_leftovers[@]}"
|
||||
fi
|
||||
'';
|
||||
''
|
||||
);
|
||||
|
||||
coverageDraftOverlay =
|
||||
checkedShellScript
|
||||
|
||||
Reference in New Issue
Block a user