Skip to content

Commit

Permalink
fix da nix
Browse files Browse the repository at this point in the history
  • Loading branch information
bristermitten committed Jun 2, 2023
1 parent d5f3438 commit 7ed19ef
Show file tree
Hide file tree
Showing 9 changed files with 236 additions and 46 deletions.
2 changes: 2 additions & 0 deletions elara.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ library
Elara.Data.Unique
Elara.Data.Unwrap
Elara.Desugar
Elara.Emit
Elara.Error
Elara.Error.Codes
Elara.Error.Effect
Expand Down Expand Up @@ -117,6 +118,7 @@ library
, generic-lens
, headed-megaparsec
, lens
, h2jvm
, megaparsec >=9.0.0
, mtl
, parser-combinators
Expand Down
215 changes: 195 additions & 20 deletions flake.lock

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

41 changes: 20 additions & 21 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,41 @@
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
flake-root.url = "github:srid/flake-root";
mission-control.url = "github:Platonic-Systems/mission-control";

h2jvm.url = "github:ElaraLang/h2jvm";

diagnose.url = "github:knightzmc/diagnose";
diagnose.flake = false;
};

outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {

systems = import inputs.systems;

imports = [
inputs.haskell-flake.flakeModule
inputs.treefmt-nix.flakeModule
inputs.flake-root.flakeModule
inputs.mission-control.flakeModule
];

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

haskellProjects.default = {
# basePackages = pkgs.haskell.packages.ghc94; # Use GHC 9.4.4

autoWire = [ "packages" "apps" "checks" ]; # Wire all but the devShell

overrides = self: super: with pkgs.haskell.lib; {
megaparsec = self.callHackage "megaparsec" "9.3.0" { };

diagnose = (dontCheck (self.callCabal2nix "diagnose"
(
pkgs.fetchgit {
url = "https://github.com/knightzmc/diagnose";
sha256 = "sha256-RqwnKus+Xga5nnV1g0lCQfqRg8zbN/IcDBZ+Sb1Bocs=";
rev = "7e8a1fe2bc3a60fdec43e96aab2a27fa1e3eb4d5";
})
{ })).overrideAttrs
(old: {
buildInputs = old.buildInputs ++ [
self.megaparsec
];
configureFlags = [ "-f megaparsec-compat" ]; # the flag configuration in stack.yaml seems to be ignoed
});
packages = {
h2jvm.source = inputs.h2jvm;
diagnose.source = inputs.diagnose;
};

settings = {
diagnose = {
extraBuildDepends = [ pkgs.haskellPackages.megaparsec ];
extraConfigureFlags = [ "-f megaparsec-compat" ];
};
};

devShell = {
Expand All @@ -64,7 +63,7 @@
programs.ormolu.enable = true;
programs.nixpkgs-fmt.enable = true;
programs.cabal-fmt.enable = false;
programs.hlint.enable = true;
programs.hlint.enable = false;

programs.ormolu.package = pkgs.haskellPackages.fourmolu;

Expand Down Expand Up @@ -97,7 +96,7 @@


packages.default = self'.packages.elara;
apps.default = self'.apps.elara;


devShells.default = pkgs.mkShell {
inputsFrom = [
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies:
- polysemy
- polysemy-plugin
- mtl
# - h2jvm
- h2jvm
- binary

ghc-options:
Expand Down
1 change: 0 additions & 1 deletion result

This file was deleted.

1 change: 1 addition & 0 deletions result-bin
Loading

0 comments on commit 7ed19ef

Please sign in to comment.