Skip to content
Snippets Groups Projects
Commit ebb6a19b authored by Ben Gamari's avatar Ben Gamari :turtle: Committed by Ben Gamari
Browse files

run-ci: Fix cabal workflow

This should fix #11.
parent 4b4c65ff
No related branches found
No related tags found
No related merge requests found
packages: .
source-repository-package
type: git
location: https://github.com/bgamari/hackage-overlay-repo-tool
tag: 18eb61c830ad908d36d343f400a1588af6b9a03a
......@@ -35,6 +35,7 @@ let
bash curl gnutar findutils patch rsync openssl
cabal-install ghc gcc binutils-unwrapped pwgen gnused
hackage-repo-tool overlay-tool python3
git # cabal-install wants this to fetch source-repository-packages
];
in
runCommand "repo" {
......
......@@ -26,17 +26,33 @@ if [ -n "$EXTRA_HC_OPTS" ]; then
fi
mkdir -p run
cd run
echo "" > deps.cabal.project
echo "" > run/deps.cabal.project
if [ -n "$USE_NIX" ]; then
# Generate native library dependency mapping
nix eval --raw -f ../. cabalDepsSrc >> deps.cabal.project
nix eval --raw -f ./. cabalDepsSrc >> run/deps.cabal.project
run="nix run -f ../. -c head-hackage-ci"
else
run="cabal new-run head-hackage-ci --"
run="head-hackage-ci"
# Sigh, this is an abysmal hack
bindir=$(realpath .)/run/bin
mkdir -p $bindir
PATH=$bindir:$PATH
cp build-repo.sh $bindir/build-repo.sh
if ! which tool; then
echo "Installing hackage-overlay-repo-tool..."
cabal new-install tool --installdir=$bindir
fi
if ! which hackage-repo-tool; then
echo "Installing hackage-repo-tool..."
cabal new-install hackage-repo-tool --installdir=$bindir
fi
cabal new-install head-hackage-ci --installdir=$bindir
fi
cd run
rm -f cabal.project
set -x
$run \
test-patches \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment