diff --git a/flake.lock b/flake.lock index e3c3233096af1d811160f64a5fff53f189cea36d..17b6fae41c1253ed5ed7f7d73569158bcc7b662f 100644 --- a/flake.lock +++ b/flake.lock @@ -216,11 +216,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1686149618, - "narHash": "sha256-/IHWacNutk3tklouWOgClp7FnOH+Yk6If13kKJMSEi8=", + "lastModified": 1692187439, + "narHash": "sha256-m7c4EPFWmB1OmV3dSYQk2qtXR53xOjZdLCjMtzHSK34=", "ref": "main", - "rev": "49696f704eb965f57d729871c6d450ac0aff2b68", - "revCount": 12, + "rev": "408f3deab2e2f6ae60349776dde02c44f71fb386", + "revCount": 16, "type": "git", "url": "https://whetstone.private.storage/jcalderone/hs-flake-utils.git" }, diff --git a/flake.nix b/flake.nix index 5e6120b2bd4c18ed597d11ccd8b9a473015af294..4fe75f92082b0c4a95343044a9db510b032380b4 100644 --- a/flake.nix +++ b/flake.nix @@ -79,25 +79,10 @@ }/bin/generate-cabal-project"; }; - # Using the working directory of `nix run`, do a build with cabal and - # then run the test suite. - apps.cabal-test = { - type = "app"; - program = "${ - pkgs.writeShellApplication { - name = "cabal-build-and-test"; - runtimeInputs = with pkgs; [pkg-config haskell.compiler.${ghcVersion} cabal-install]; - - text = '' - set -ex - nix run .#generate-cabal-project - cabal update hackage.haskell.org - cabal build --enable-tests - runtests=$(cabal list-bin --enable-tests tahoe-ssk-test) - eval "$runtests" - ''; - } - }/bin/cabal-build-and-test"; + apps.cabal-test = hslib.apps.cabal-test { + preBuild = "nix run .#generate-cabal-project"; }; + + apps.release = hslib.apps.release {}; }); }