]> Git — Sourcephile - haskell/symantic-parser.git/blob - default.nix
cabal: clean up
[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 = 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 # FIXME: remove when Nixpkgs' haskellPackages.ormolu is no longer broken
33 CABAL_TEST_FLAGS = "-fdisable-ormolu-check";
34 nativeBuildInputs = [
35 hs.cabal-install
36 hs.eventlog2html
37 hs.ghc-events
38 hs.ghcid
39 hs.hlint
40 hs.hs-speedscope
41 hs.ormolu
42 hs.profiteur
43 #hs.threadscope
44 #hs.ghc-events-analyze
45 #hs.haskell-language-server
46 #hs.hpc
47 ];
48 buildInputs = [
49 #hs.ghcid
50 pkgs.cabal2nix
51 #hs.hlint
52 #pkgs.nixpkgs-fmt
53 ];
54 inherit withHoogle;
55 };
56 }