diff --git a/README.md b/README.md index edccfb9..7117645 100644 --- a/README.md +++ b/README.md @@ -107,4 +107,6 @@ To work on this project you need a Haskell toolchain: [get-started](https://www. Run the `./bin/run-tests` script to validate a commit. +Run the test through ghcid with: `./bin/run-ghcid Main.main`. + Setup binary cache with: `nix run nixpkgs/release-22.11#cachix use haskell-platform`. diff --git a/bin/repl b/bin/repl new file mode 100755 index 0000000..563b14e --- /dev/null +++ b/bin/repl @@ -0,0 +1,3 @@ +#!/bin/sh -e + +exec cabal repl --enable-multi-repl lib:butler lib:butler-desktop test:spec $* diff --git a/bin/run-ghcid b/bin/run-ghcid index b6dce7d..73b8119 100755 --- a/bin/run-ghcid +++ b/bin/run-ghcid @@ -1,2 +1,2 @@ #!/bin/sh -nix develop --command ghcid --command "cabal repl butler-desktop" -W --test "${1:-ButlerDemos.multiDesktop}" +nix develop --command ghcid --command "./bin/repl" -W --test "${1:-ButlerDemos.multiDesktop}" diff --git a/flake.lock b/flake.lock index e9a3d9d..6196165 100644 --- a/flake.lock +++ b/flake.lock @@ -5,17 +5,17 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1692544065, - "narHash": "sha256-XH7W0NxZ5Kgm3kex6aG6fc99uFIKWaAjt37/GGbKkgQ=", + "lastModified": 1692547144, + "narHash": "sha256-N8OIAQiW9XwXN3ONc3Rp9Kk+ah/LLaJhq15eY77VSZM=", "owner": "podenv", "repo": "hspkgs", - "rev": "30b0954150719797ba9fd5e8e1652a03604d823f", + "rev": "816d9e6d854152c13837daa1e1c89a987ef908df", "type": "github" }, "original": { "owner": "podenv", "repo": "hspkgs", - "rev": "30b0954150719797ba9fd5e8e1652a03604d823f", + "rev": "816d9e6d854152c13837daa1e1c89a987ef908df", "type": "github" } }, diff --git a/flake.nix b/flake.nix index c78181a..96b92b8 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ nixConfig.bash-prompt = "[nix(butler)] "; inputs = { hspkgs.url = - "github:podenv/hspkgs/30b0954150719797ba9fd5e8e1652a03604d823f"; + "github:podenv/hspkgs/816d9e6d854152c13837daa1e1c89a987ef908df"; # "path:///srv/github.com/podenv/hspkgs"; }; outputs = { self, hspkgs }: @@ -145,7 +145,7 @@ baseTools = with pkgs; [ cabal-fmt nixfmt - cabal-install + cabal-multi-repl # TODO: Switch back to cabal-install when cabal-3.11 is released hlint tasty-discover fourmolu