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
|
, checkedShellScript
|
||||||
, devCabalOptions
|
, devCabalOptions
|
||||||
, ghc
|
, ghc
|
||||||
, glibcLocales
|
, glibcLocales ? null
|
||||||
, gnugrep
|
, gnugrep
|
||||||
, hpc-codecov
|
, hpc-codecov
|
||||||
|
, hostPlatform
|
||||||
, jq
|
, jq
|
||||||
|
, lib
|
||||||
, postgrest
|
, postgrest
|
||||||
, python3
|
, python3
|
||||||
, runtimeShell
|
, runtimeShell
|
||||||
|
, stdenv
|
||||||
, weeder
|
, weeder
|
||||||
, withTools
|
, withTools
|
||||||
, yq
|
, yq
|
||||||
@@ -125,9 +128,13 @@ let
|
|||||||
withEnv = postgrest.env;
|
withEnv = postgrest.env;
|
||||||
withTmpDir = true;
|
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"
|
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
|
||||||
|
'' +
|
||||||
|
|
||||||
|
''
|
||||||
# clean up previous coverage reports
|
# clean up previous coverage reports
|
||||||
mkdir -p coverage
|
mkdir -p coverage
|
||||||
rm -rf coverage/*
|
rm -rf coverage/*
|
||||||
@@ -185,7 +192,8 @@ let
|
|||||||
echo "file://$(pwd)/coverage/hpc_index.html"
|
echo "file://$(pwd)/coverage/hpc_index.html"
|
||||||
${ghc}/bin/hpc report coverage/postgrest.tix "''${_arg_leftovers[@]}"
|
${ghc}/bin/hpc report coverage/postgrest.tix "''${_arg_leftovers[@]}"
|
||||||
fi
|
fi
|
||||||
'';
|
''
|
||||||
|
);
|
||||||
|
|
||||||
coverageDraftOverlay =
|
coverageDraftOverlay =
|
||||||
checkedShellScript
|
checkedShellScript
|
||||||
|
|||||||
Reference in New Issue
Block a user