]> Git — Sourcephile - haskell/symantic-parser.git/blob - default.nix
rename Symantic.{Univariant => Typed}
[haskell/symantic-parser.git] / default.nix
1 { pkgs ? import <nixpkgs> {}
2 , ghc ? "ghc901"
3 , withHoogle ? false
4 }:
5 let
6 haskellPackages =
7 if ghc == null
8 then pkgs.haskellPackages
9 else pkgs.haskell.packages.${ghc};
10 hs = haskellPackages.extend (with pkgs.haskell.lib; hself: hsuper:
11 {
12 #symantic-parser = enableExecutableProfiling (doCheck ( hself.callCabal2nix "symantic-parser" ./. {}));
13 # FIXME: this should not be necessary, but haskellPackages.ormolu is currently broken.
14 ormolu = pkgs.ormolu;
15 text-short = dontCheck hsuper.text-short;
16 hs-speedscope = doJailbreak (unmarkBroken hsuper.hs-speedscope);
17 eventlog2html = doJailbreak (unmarkBroken hsuper.eventlog2html);
18 trie-simple = doJailbreak (unmarkBroken hsuper.trie-simple);
19 symantic-parser = doBenchmark (buildFromSdist (hself.callCabal2nix "symantic-parser" ./. {}));
20 hlint = hsuper.hlint_3_3_1.overrideScope (self: super: {
21 ghc-lib-parser = overrideCabal self.ghc-lib-parser_9_0_1_20210324 {
22 doHaddock = false;
23 };
24 ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_0_0_4;
25 });
26 }
27 );
28 in hs.symantic-parser // {
29 shell = hs.shellFor {
30 doBenchmark = true;
31 packages = p: [ p.symantic-parser ];
32 nativeBuildInputs = [
33 hs.cabal-install
34 hs.ghc-events
35 hs.hs-speedscope
36 hs.profiteur
37 hs.eventlog2html
38 hs.ghcid
39 #hs.threadscope
40 #hs.ghc-events-analyze
41 hs.hlint
42 #hs.haskell-language-server
43 #hs.hpc
44 ];
45 buildInputs = [
46 #hs.ghcid
47 pkgs.ormolu
48 pkgs.cabal2nix
49 #hs.hlint
50 #pkgs.nixpkgs-fmt
51 ];
52 inherit withHoogle;
53 };
54 }