diff --git a/README.md b/README.md index ac17a00..d91676e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Get a Haskell development environment up and running quickly. Thanks to Nix, this template is optimized for a fully reproducible and friendly development environment. It is based on: -- [Nix](https://srid.ca/haskell-nix) + [Flakes](https://serokell.io/blog/practical-nix-flakes) (via [`github:srid/haskell-flake`](https://github.com/srid/haskell-flake)) + GHC 9 +- [Nix](https://srid.ca/haskell-nix) + [Flakes](https://serokell.io/blog/practical-nix-flakes) (via [`github:srid/haskell-flake`](https://github.com/srid/haskell-flake)) + GHC 9.2 - VSCode + [HLS](https://github.com/haskell/haskell-language-server) - [fourmolu](https://github.com/fourmolu/fourmolu) autoformatting - [Relude](https://github.com/kowainik/relude#relude) as Prelude. diff --git a/flake.lock b/flake.lock index bd819b4..c4f8153 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1671322946, - "narHash": "sha256-J8Qj+ITV+eti+irTK9Zn2LZVYoIW2g7irPUckU8yZvU=", + "lastModified": 1673362319, + "narHash": "sha256-Pjp45Vnj7S/b3BRpZEVfdu8sqqA6nvVjvYu59okhOyI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3f7172646953bf86dad5953bc45f0edae62ac445", + "rev": "82c16f1682cf50c01cb0280b38a1eed202b3fe9f", "type": "github" }, "original": { @@ -35,11 +35,11 @@ }, "haskell-flake": { "locked": { - "lastModified": 1671460011, - "narHash": "sha256-Do7coaucS6ZjNysizQsVPYLLFkq6eQse8n7bzzjAy2I=", + "lastModified": 1674066917, + "narHash": "sha256-nRSAb7N64zmAbXUoVVqY/s2LbSIdDTdfN0sSKG5/CCY=", "owner": "srid", "repo": "haskell-flake", - "rev": "54334cfae9bbb73732bbb1437260017044f68d0b", + "rev": "c6ff897db9abdd4e5ff7911b5f9234a1380c6611", "type": "github" }, "original": { @@ -53,11 +53,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1671465334, - "narHash": "sha256-wdV5rU+lpn/jYfdj+W6EtFdAz/PrSHHwy8FMWrG4VSw=", + "lastModified": 1671493916, + "narHash": "sha256-7uvy37mfprmI3fbBw9E+baV1KZHR5zKfSNfPlSiliqo=", "owner": "Platonic-Systems", "repo": "mission-control", - "rev": "cbdbc4e772fe08f856ae4865826f8ecac0af7c3d", + "rev": "9acdaa469ebd3c2d6816f8a30c0c217a0da59fe2", "type": "github" }, "original": { @@ -85,11 +85,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1665349835, - "narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=", + "lastModified": 1672350804, + "narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1", + "rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6", "type": "github" }, "original": { @@ -102,11 +102,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1671417167, - "narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=", + "lastModified": 1674096995, + "narHash": "sha256-/vw7At/SztpZjTeM11foA7YdOFmdwSn+ARo8oy+mlUU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7", + "rev": "676c80dcc2f0ba780c8ab204f92c5abd69fa1245", "type": "github" }, "original": { @@ -128,11 +128,11 @@ }, "treefmt-nix": { "locked": { - "lastModified": 1671882555, - "narHash": "sha256-43HxY5gNaDMkKckeEXbhua4Ay1/S1HnYzqZBIVhzeqI=", + "lastModified": 1672931382, + "narHash": "sha256-lgtc2Sct/xtvqkdzlJ4AL3Vesw0Wz/fxqNGOBFS7YXU=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "97981314ddf673803a1d5f966014f444a1054b1e", + "rev": "6717065d6a432bc3f5b827007ad959e6032d5856", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0772e92..b01296c 100644 --- a/flake.nix +++ b/flake.nix @@ -25,9 +25,21 @@ packages = { haskell-template.root = ./.; }; - buildTools = hp: { - treefmt = config.treefmt.build.wrapper; - } // config.treefmt.build.programs; + buildTools = hp: + let + # Workaround for https://github.com/NixOS/nixpkgs/issues/140774 + fixCyclicReference = drv: + pkgs.haskell.lib.overrideCabal drv (_: { + enableSeparateBinOutput = false; + }); + in + { + treefmt = config.treefmt.build.wrapper; + ghcid = fixCyclicReference hp.ghcid; + haskell-language-server = hp.haskell-language-server.overrideScope (lself: lsuper: { + ormolu = fixCyclicReference hp.ormolu; + }); + } // config.treefmt.build.programs; # overrides = self: super: with pkgs.haskell.lib; {}; hlsCheck.enable = false; hlintCheck.enable = true;