Browse Source

Switch to Cabal v2 style aliases

master
Peter J. Jones 1 month 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 @@
1
+/result

+ 6
- 6
nix/interactive.nix View File

@@ -40,32 +40,32 @@ let
40 40
 
41 41
     do_cabal_configure() {
42 42
       set -e
43
-      cabal configure ${cabalConfigureFlags}
43
+      cabal v2-configure ${cabalConfigureFlags}
44 44
     }
45 45
 
46 46
     do_cabal_build() {
47 47
       set -e
48
-      cabal build
48
+      cabal v2-build
49 49
     }
50 50
 
51 51
     do_cabal_test() {
52 52
       set -e
53
-      cabal test
53
+      cabal v2-test
54 54
     }
55 55
 
56 56
     do_cabal_clean() {
57 57
       set -e
58
-      cabal clean
58
+      cabal v2-clean
59 59
     }
60 60
 
61 61
     do_cabal_repl() {
62 62
       set -e
63
-      cabal repl "$@"
63
+      cabal v2-repl "$@"
64 64
     }
65 65
 
66 66
     do_cabal_haddock() {
67 67
       set -e
68
-      cabal haddock
68
+      cabal v2-haddock
69 69
     }
70 70
   '';
71 71
 

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

@@ -177,11 +177,11 @@ prepare_nix_files() {
177 177
 # If needed, run `cabal configure'.
178 178
 cabal_configure() {
179 179
   local cabal_file=${HASKELL_PROJECT_NAME}.cabal
180
-  local datestamp=dist/.configure-run-date
180
+  local datestamp=dist-newstyle/.configure-run-date
181 181
 
182 182
   if [ ! -r "$datestamp" ] || [ "$cabal_file" -nt "$datestamp" ]; then
183 183
     nix_shell_extra --command "do_cabal_configure"
184
-    date > dist/.configure-run-date
184
+    date > "$datestamp"
185 185
   fi
186 186
 }
187 187
 
@@ -218,7 +218,7 @@ run_cabal() {
218 218
       run_cabal clean
219 219
       run_cabal build
220 220
       nix_shell -p haskellPackages.cabal-install \
221
-                --run "cabal sdist"
221
+                --run "cabal v2-sdist"
222 222
 
223 223
       nix_shell -p haskellPackages.cabal-install \
224 224
                 --run "cabal upload ${upload_flags[*]} $upload_name"

Loading…
Cancel
Save