Check that the library component package.conf.d/*.conf file is created (#956)

Had a strange issue where eval of #955 and it might have been caused
by a the nix-tools library seeming to have no `.conf` files.

Since it seemed to go away by itself I think this was a nix GC issue
or something.  Here is some code we could add to the builders to
double check the files are created if it turns out that is not the
case.

Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
This commit is contained in:
Hamish Mackenzie 2021-07-06 13:24:17 +12:00 committed by GitHub
parent d8f6361282
commit 062a0317b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -515,6 +515,16 @@ let
echo The test ${package.identifier.name}.components.tests.${componentId.cname} was built. To run the test build ${package.identifier.name}.checks.${componentId.cname}.
'');
doInstallCheck = true;
installCheckPhase = lib.optionalString (haskellLib.isLibrary componentId) ''
if test -n "$(shopt -s nullglob; echo $out/package.conf.d/${name}-*.conf)"; then
echo $out/package.conf.d/${name}-*.conf " is present"
else
echo "ERROR: $out/package.conf.d/${name}-*.conf was not created"
exit 1
fi
'';
shellHook = ''
export PATH="${shellWrappers}/bin:$PATH"
${shellHookApplied}