on iko/ghcjs-patch-master help sign in
Support for source-repo only cabal.project file (#1236)
afee42bHamish Mackenzie
lib/call-cabal-project-to-nix.nix+6−2
@@ -458,9 +458,13 @@ let
458 # repo yet. We fail early and provide a useful error
458 # repo yet. We fail early and provide a useful error
459 # message to prevent headaches (#290).
459 # message to prevent headaches (#290).
460 if [ -z "$(ls -A ${maybeCleanedSource})" ]; then
460 if [ -z "$(ls -A ${maybeCleanedSource})" ]; then
461− echo "cleaned source is empty. Did you forget to 'git add -A'?"; exit 1;
461+ echo "cleaned source is empty. Did you forget to 'git add -A'?"
462+ ${pkgs.lib.optionalString (__length fixedProject.sourceRepos == 0) ''
463+ exit 1
464+ ''}
465+ else
466+ cp -r ${maybeCleanedSource}/* .
462 fi
467 fi
463− cp -r ${maybeCleanedSource}/* .
464 chmod +w -R .
468 chmod +w -R .
465 # Decide what to do for each `package.yaml` file.
469 # Decide what to do for each `package.yaml` file.
466 for hpackFile in $(find . -name package.yaml); do (
470 for hpackFile in $(find . -name package.yaml); do (