diff --git a/README.md b/README.md index e9bafb6..2311769 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ Nix-based project configuration shared between nammayatri repositories - The common flakeModule provides: - treefmt-based autoformatters: ormolu, hlint, dhall-format, nixpkgs-fmt - Common Haskell configuration - - GHC 8.10 package set (matching LTS 16.31 in part) + - ~~GHC 8.10 package set (matching LTS 16.31 in part)~~ (DEPRECATED, file and references kept for posterity only) + - GHC 9.2.7 package set - Avoid global tool caches (`no-global-cache.nix`) - `mission-control` - `process-compose-flake` diff --git a/flake-module.nix b/flake-module.nix index bae299b..80d14ef 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -8,7 +8,8 @@ common: common.inputs.haskell-flake.flakeModule (import ./nix/treefmt.nix common) ./nix/haskell - ./nix/ghc810.nix + # ./nix/ghc810.nix + ./nix/ghc927.nix ./nix/pre-commit.nix ./nix/arion.nix common.inputs.cachix-push.flakeModule diff --git a/flake.nix b/flake.nix index 2c344d0..69ad617 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,8 @@ outputs = inputs: { flakeModules = { default = import ./flake-module.nix { inherit inputs; }; - ghc810 = ./nix/ghc810.nix; + # ghc810 = ./nix/ghc810.nix; + ghc927 = ./nix/ghc927.nix; }; lib.mkFlake = args: mod: diff --git a/nix/ghc927.nix b/nix/ghc927.nix new file mode 100644 index 0000000..f8ebeab --- /dev/null +++ b/nix/ghc927.nix @@ -0,0 +1,53 @@ +# To use this package set in your `haskell-flake` projects, set the +# `basePackages` option as follows: +# +# > basePackages = config.haskellProjects.ghc927.outputs.finalPackages; +# +{ + perSystem = { pkgs, lib, config, ... }: { + haskellProjects.ghc927 = { + projectFlakeName = "nammayatri:common"; + + # This is not a local project, so disable those options. + defaults.packages = {}; + devShell.enable = false; + autoWire = [ ]; + + # Uses GHC-9.2.7 package set as base + + # We use a versioned package-set instead of the more + # general `pkgs.haskellPackages` set in order to be + # more explicit about our intentions to use a + # specific GHC version and by extension the related + # packages versions that come with this snapshot + + basePackages = pkgs.haskell.packages.ghc927; + + packages = { + # Dependencies from Hackage + + }; + + settings = { + binary-parsers = { + broken = false; + jailbreak = true; + }; + mysql-haskell = { + jailbreak = true; + }; + prometheus-proc = { + broken = false; + jailbreak = true; + }; + lrucaching = { + broken = false; + jailbreak = true; + }; + wire-streams = { + jailbreak = true; + }; + }; + }; + }; +} diff --git a/nix/haskell/default.nix b/nix/haskell/default.nix index c056fc2..7496da4 100644 --- a/nix/haskell/default.nix +++ b/nix/haskell/default.nix @@ -5,7 +5,7 @@ ./no-global-cache.nix ./devtools.nix ]; - basePackages = config.haskellProjects.ghc810.outputs.finalPackages; + basePackages = config.haskellProjects.ghc927.outputs.finalPackages; }; }; }