Skip to content

Commit b4fdf4b

Browse files
committed
Tests: use installed executable instead
1 parent 8c41c23 commit b4fdf4b

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

.github/workflows/nix-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v5
1616
- uses: cachix/install-nix-action@v31
17-
- run: sudo apt install cabal-install
1817
- run: nix build ./#agda2lambox --print-build-logs

flake.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@
3131
haskellPackages = prev.haskellPackages.extend (
3232
hfinal: hprev: {
3333
sexpresso = hLib.doJailbreak (hLib.markUnbroken hprev.sexpresso);
34-
agda2lambox = hLib.doJailbreak (hfinal.callCabal2nix "agda2lambox" ./. { });
34+
agda2lambox = hLib.doJailbreak
35+
(hLib.overrideCabal
36+
(hfinal.callCabal2nix "agda2lambox" ./. { })
37+
(old: {
38+
phases = [ "unpackPhase" "configurePhase" "buildPhase" "installPhase" "checkPhase" ];
39+
}));
3540
}
3641
);
3742
};

src/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ defaultOptions = Options
8181
type ModuleEnv = ()
8282
type ModuleRes = ()
8383

84-
-- | The adga2lambox backend.
84+
-- | The agda2lambox backend.
8585
agda2lambox :: Backend
8686
agda2lambox = Backend backend
8787
where

test/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ mkAgdaTest mLboxPath buildDir subdir isTyped baseFile = testCase ("Test: " ++ (s
7373

7474
-- Step 1: Run agda2lambox on the file (run with cwd=subdir so Agda sees basename)
7575
let typedFlag = ["--typed" | isTyped]
76-
cp = (proc "cabal" (["run", "--", "agda2lambox"] ++ typedFlag ++ ["-o", buildDir, baseFile]))
76+
cp = (proc "agda2lambox" (typedFlag ++ ["-o", buildDir, baseFile]))
7777
{ cwd = Just subdir }
7878
(exitCode, stdout, stderr) <- readCreateProcessWithExitCode cp ""
7979

0 commit comments

Comments
 (0)