From a79628d7e2c43886496e57d2ba2fa1bc4ba14791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 2 Jun 2025 19:43:01 +0200 Subject: [PATCH] devShells/flora: update ghc to 9.10 --- nix/devShells/flora.nix | 31 +++++++++++++++---------------- nix/sources.json | 12 ++++++++++++ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/nix/devShells/flora.nix b/nix/devShells/flora.nix index 406e8ac5..9b86e3d7 100644 --- a/nix/devShells/flora.nix +++ b/nix/devShells/flora.nix @@ -4,7 +4,7 @@ let sources = import ../sources.nix; in - {pkgs ? import sources.nixpkgs-unstable {}}: + {pkgs ? import sources.pin-florashell {}}: pkgs.mkShell (let libs = with pkgs; [ zlib @@ -12,25 +12,24 @@ in libsodium ]; - fourmolu = let - pkgs = import sources.pin-fourmolu {}; - in - with pkgs; let - hlib = haskell.lib; - fourmolu = haskell.packages.ghc910.callHackage "fourmolu" "0.17.0.0" {}; - in - hlib.dontCheck (hlib.doJailbreak fourmolu); + hlib = pkgs.haskell.lib; + + callHackage = {name, version}: + let pkg = pkgs.haskell.packages.ghc910.callHackage name version {}; + in hlib.dontCheck (hlib.doJailbreak pkg); in { name = "flora"; packages = with pkgs; - [ - haskellPackages.postgresql-migration - fourmolu - haskellPackages.hlint - haskellPackages.apply-refact + let + haskellPackages = haskell.packages.ghc910; + in + # These don't build directly and need to be pinned + map callHackage [ + {name = "fourmolu"; version = "0.17.0.0";} + {name = "postgresql-migration"; version = "0.2.1.8";} + ] + ++ [ haskellPackages.ghcid - haskellPackages.ghc-tags - haskellPackages.cabal-fmt haskellPackages.cabal-install haskellPackages.ghc diff --git a/nix/sources.json b/nix/sources.json index 21e7a166..7be8d339 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -103,6 +103,18 @@ "url": "https://github.com/NixOS/nixpkgs/archive/7282cb574e0607e65224d33be8241eae7cfe0979.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, + "pin-florashell": { + "branch": "nixos-25.05", + "description": "Nix Packages collection", + "homepage": null, + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7282cb574e0607e65224d33be8241eae7cfe0979", + "sha256": "0klkpy7ah033y3cwj51a0l96lwmkqqvwgfv3kid4z9x5g2rqr0l5", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/7282cb574e0607e65224d33be8241eae7cfe0979.tar.gz", + "url_template": "https://github.com///archive/.tar.gz" + }, "nixpkgs-unstable": { "branch": "nixos-unstable", "description": "Nix Packages collection & NixOS",