Skip to content

Commit

Permalink
update flake; Haskpatch -> wip
Browse files Browse the repository at this point in the history
  • Loading branch information
raehik committed Nov 15, 2023
1 parent 7a50706 commit 4b499f0
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 53 deletions.
1 change: 0 additions & 1 deletion binrep.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ library
Bytezap.Poke.Int
Bytezap.Text
Data.Aeson.Extra.SizedVector
Haskpatch
Util.TypeNats
other-modules:
Paths_binrep
Expand Down
43 changes: 13 additions & 30 deletions flake.lock

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

56 changes: 34 additions & 22 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,46 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/haskell-updates";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
generic-data-functions = {
url = "github:raehik/generic-data-functions";
flake = false;
};
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
outputs = inputs:
let
# simple devshell for non-dev compilers: really just want `cabal repl`
nondevDevShell = compiler: {
mkShellArgs.name = "${compiler}-generic-data-functions";
hoogle = false;
tools = _: {
hlint = null;
haskell-language-server = null;
ghcid = null;
};
};
in
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
imports = [ inputs.haskell-flake.flakeModule ];
perSystem = { self', pkgs, config, ... }: {
packages.default = self'.packages.binrep;
haskellProjects.ghc96 = import ./haskell-flake-ghc96.nix pkgs;
haskellProjects.default = {
#basePackages = config.haskellProjects.ghc96.outputs.finalPackages;
packages = {
generic-data-functions.source = inputs.generic-data-functions;
#strongweak.source = "0.6.0";
#flatparse.source = "0.4.1.0";
};
devShell = {
tools = hp: {
ghcid = null; # broken on GHC 9.6? fsnotify
hlint = null; # broken on GHC 9.6?
haskell-language-server = null; # TAKES AGES TO BUILD FFS
packages.default = self'.packages.ghc96-binrep;
devShells.default = self'.devShells.ghc96;
haskellProjects.ghc96 = {
# 2023-11-14: GHC 9.6 base package set is borked
# PR: https://github.com/NixOS/nixpkgs/pull/267477
basePackages = pkgs.haskell.packages.ghc96.override {
overrides = self: super: {
fgl = self.fgl_5_8_2_0;
th-desugar = self.th-desugar_1_16;
};
};
devShell.mkShellArgs.name = "ghc96-binrep";
};
haskellProjects.ghc94 = {
basePackages = pkgs.haskell.packages.ghc94;
devShell = nondevDevShell "ghc94";
};
haskellProjects.ghc92 = {
basePackages = pkgs.haskell.packages.ghc92;
devShell = nondevDevShell "ghc92";
};
};
};
Expand Down
File renamed without changes.

0 comments on commit 4b499f0

Please sign in to comment.