Skip to content

Commit

Permalink
redo nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
raehik committed Apr 2, 2024
1 parent e053a30 commit c842b2c
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,25 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
refined1 = {
url = "github:raehik/refined/refined1-hackage";
flake = false;
};
refined1.url = "github:raehik/refined/refined1-hackage";
refined1.flake = false;
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
imports = [ inputs.haskell-flake.flakeModule ];

perSystem = { self', pkgs, config, ... }: {

haskellProjects.ghc96 = import ./haskell-flake-ghc96.nix pkgs;

haskellProjects.default = {
basePackages = config.haskellProjects.ghc96.outputs.finalPackages;

packages = {
refined1.source = inputs.refined1;
};

devShell = {
tools = hp: {
ghcid = null; # broken on GHC 9.6? old fsnotify
hlint = null; # broken on GHC 9.6? old
haskell-language-server = null; # TAKES AGES TO BUILD FFS
};
};

packages.default = self'.packages.ghc96-strongweak;
devShells.default = self'.devShells.ghc96;
haskellProjects.ghc98 = {
basePackages = pkgs.haskell.packages.ghc98;
packages.refined1.source = inputs.refined1;
};
haskellProjects.ghc96 = {
basePackages = pkgs.haskell.packages.ghc96;
packages.refined1.source = inputs.refined1;
devShell.mkShellArgs.name = "ghc96-strongweak";
};

packages.default = self'.packages.strongweak;
};
};
}

0 comments on commit c842b2c

Please sign in to comment.