Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Nix-based project configuration shared between nammayatri repositories
- Automatic importing of the common flakeModule.
- 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)~~ (DEPRECATED, file and references kept for posterity only)
- GHC 9.2.8 package set
- Avoid global tool caches (`no-global-cache.nix`)
- Common `package.yaml` (hpack) configuration
- `mission-control`
- `process-compose-flake`
- pre-commit hooks
Expand Down
2 changes: 1 addition & 1 deletion flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ common:
(import ./nix/treefmt.nix common)
./nix/haskell
# ./nix/ghc810.nix
./nix/ghc927.nix
./nix/ghc928.nix
./nix/pre-commit.nix
./nix/arion.nix
common.inputs.cachix-push.flakeModule
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
flakeModules = {
default = import ./flake-module.nix { inherit inputs; };
# ghc810 = ./nix/ghc810.nix;
ghc927 = ./nix/ghc927.nix;
ghc928 = ./nix/ghc928.nix;
};

lib.mkFlake = args: mod:
Expand Down
10 changes: 5 additions & 5 deletions nix/ghc927.nix → nix/ghc928.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# To use this package set in your `haskell-flake` projects, set the
# `basePackages` option as follows:
#
# > basePackages = config.haskellProjects.ghc927.outputs.finalPackages;
# > basePackages = config.haskellProjects.ghc928.outputs.finalPackages;
#
{
perSystem = { pkgs, lib, config, ... }: {
haskellProjects.ghc927 = {
haskellProjects.ghc928 = {
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
# Uses GHC-9.2.8 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;
basePackages = pkgs.haskell.packages.ghc928;

packages = {
# Dependencies from Hackage

persistent.source = "2.14.5.2";
};

settings = {
Expand Down
2 changes: 1 addition & 1 deletion nix/haskell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
./no-global-cache.nix
./devtools.nix
];
basePackages = config.haskellProjects.ghc927.outputs.finalPackages;
basePackages = config.haskellProjects.ghc928.outputs.finalPackages;
defaults.settings.default = { name, package, config, ... }:
lib.optionalAttrs (package.local.toDefinedProject or false) {
# Disabling haddock and profiling is mainly to speed up Nix builds.
Expand Down