]> Git — Sourcephile - haskell/symantic-parser.git/blob - default.nix
replace ValueCode by Production
[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.ghcid
33 #hs.threadscope
34 #hs.ghc-events-analyze
35 #hs.haskell-language-server
36 #hs.hpc
37 ];
38 buildInputs = [
39 #hs.ghcid
40 pkgs.ormolu
41 pkgs.cabal2nix
42 #hs.hlint
43 #pkgs.nixpkgs-fmt
44 ];
45 inherit withHoogle;
46 };
47 }