diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8252b041b8f0e9082af5a5576dfd39a5e338a503..5ac789faccae19f98ba59dd94f7806b665358aa3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,10 +23,10 @@ hlint: nix run .#hlint -- src/ test/ # Use cabal to build the library and test suite and then run the test suite. -cabal-build-and-test: +"cabal-build-and-test-8.6.5": script: - | - nix run .#cabal-test + nix run .#cabal-test-865 # Use nix to build the library and test suite and run the test suite. nix-build-and-test: diff --git a/flake.nix b/flake.nix index ced2464ab54332a86ca8ea1deec37bdb93dea1a2..68d34083243f121e673b25b1239951a6487ae8ee 100644 --- a/flake.nix +++ b/flake.nix @@ -28,20 +28,22 @@ compilerVersion = ghcVersion; packageName = "tahoe-chk"; }; - in { - checks = hslib.checks {}; - devShells = hslib.devShells {}; - packages = hslib.packages {}; - apps.hlint = hslib.apps.hlint {}; - # Using the working directory of `nix run`, do a build with cabal and - # then run the test suite. - apps.cabal-test = { + # string -> flake app + # + # make a flake app that runs the test suite using cabal and the given + # version of ghc. The ghc version is found in the nixpkgs + # `haskell.compiler` attribute set. + mkCabalTest = ghcVersion: { type = "app"; program = "${ pkgs.writeShellApplication { name = "cabal-build-and-test"; - runtimeInputs = with pkgs; [pkg-config haskell.compiler.${ghcVersion} cabal-install]; + runtimeInputs = with pkgs; [ + pkg-config + haskell.compiler.${ghcVersion} + cabal-install + ]; text = '' set -ex @@ -53,6 +55,15 @@ } }/bin/cabal-build-and-test"; }; + in { + checks = hslib.checks {}; + devShells = hslib.devShells {}; + packages = hslib.packages {}; + apps.hlint = hslib.apps.hlint {}; + + # Using the working directory of `nix run`, do a build with cabal and + # then run the test suite. + apps.cabal-test-865 = mkCabalTest "ghc865Binary"; apps.release = { type = "app"; diff --git a/tahoe-chk.cabal b/tahoe-chk.cabal index 383af07df5aece4189e7c5c03ac3a1578681aab9..78ce5b2c9fe3975d71865b7e6a8b92760a7868d4 100644 --- a/tahoe-chk.cabal +++ b/tahoe-chk.cabal @@ -22,6 +22,8 @@ extra-source-files: ChangeLog.md README.md +tested-with: GHC ==8.6.5 + source-repository head type: git location: