]> Git — Sourcephile - haskell/symantic-parser.git/blob - default.nix
doc: improve a bit the ReadMe.md
[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 }
21 );
22 in hs.symantic-parser // {
23 shell = hs.shellFor {
24 doBenchmark = true;
25 packages = p: [ p.symantic-parser ];
26 nativeBuildInputs = [
27 hs.cabal-install
28 hs.ghc-events
29 hs.hs-speedscope
30 hs.profiteur
31 hs.eventlog2html
32 #hs.threadscope
33 #hs.ghc-events-analyze
34 #hs.haskell-language-server
35 #hs.hpc
36 ];
37 buildInputs = [
38 #hs.ghcid
39 pkgs.ormolu
40 pkgs.cabal2nix
41 #hs.hlint
42 #pkgs.nixpkgs-fmt
43 ];
44 inherit withHoogle;
45 };
46 }