Browse Source

Switch to Cabal v2 style aliases

next
Peter J. Jones 4 months ago
parent
commit
0211a56b72
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
3 changed files with 10 additions and 9 deletions
  1. 1
    0
      .gitignore
  2. 6
    6
      nix/interactive.nix
  3. 3
    3
      src/nix-hs.sh

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
/result

+ 6
- 6
nix/interactive.nix View File

@@ -40,32 +40,32 @@ let

do_cabal_configure() {
set -e
cabal configure ${cabalConfigureFlags}
cabal v2-configure ${cabalConfigureFlags}
}

do_cabal_build() {
set -e
cabal build
cabal v2-build
}

do_cabal_test() {
set -e
cabal test
cabal v2-test
}

do_cabal_clean() {
set -e
cabal clean
cabal v2-clean
}

do_cabal_repl() {
set -e
cabal repl "$@"
cabal v2-repl "$@"
}

do_cabal_haddock() {
set -e
cabal haddock
cabal v2-haddock
}
'';


+ 3
- 3
src/nix-hs.sh View File

@@ -177,11 +177,11 @@ prepare_nix_files() {
# If needed, run `cabal configure'.
cabal_configure() {
local cabal_file=${HASKELL_PROJECT_NAME}.cabal
local datestamp=dist/.configure-run-date
local datestamp=dist-newstyle/.configure-run-date

if [ ! -r "$datestamp" ] || [ "$cabal_file" -nt "$datestamp" ]; then
nix_shell_extra --command "do_cabal_configure"
date > dist/.configure-run-date
date > "$datestamp"
fi
}

@@ -218,7 +218,7 @@ run_cabal() {
run_cabal clean
run_cabal build
nix_shell -p haskellPackages.cabal-install \
--run "cabal sdist"
--run "cabal v2-sdist"

nix_shell -p haskellPackages.cabal-install \
--run "cabal upload ${upload_flags[*]} $upload_name"

Loading…
Cancel
Save