]> Git — Sourcephile - haskell/symantic-parser.git/blob - default.nix
build: cleanup Nix files
[haskell/symantic-parser.git] / default.nix
1 { pkgs ? import <nixpkgs> {}
2 , inputs
3 , ghc ? "ghc901"
4 , withHoogle ? false
5 }:
6 let
7 haskellPackages =
8 if ghc == null
9 then pkgs.haskellPackages
10 else pkgs.haskell.packages.${ghc};
11 hs = haskellPackages.extend (with pkgs.haskell.lib; hself: hsuper: {
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-base = buildFromSdist (hself.callCabal2nix "symantic-base" inputs.symantic-base {});
20 symantic-parser = doBenchmark (buildFromSdist (hself.callCabal2nix "symantic-parser" ./. {}));
21 /*
22 hlint = hsuper.hlint_3_3_1.overrideScope (self: super: {
23 ghc-lib-parser = overrideCabal self.ghc-lib-parser_9_0_1_20210324 {
24 doHaddock = false;
25 };
26 ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_0_0_4;
27 });
28 */
29 }
30 );
31 in hs.symantic-parser // {
32 shell = hs.shellFor {
33 doBenchmark = true;
34 packages = p: [ p.symantic-parser ];
35 # FIXME: remove when Nixpkgs' haskellPackages.ormolu is no longer broken
36 CABAL_TEST_FLAGS = "-fdisable-ormolu-check";
37 nativeBuildInputs = [
38 hs.cabal-install
39 hs.eventlog2html
40 hs.ghc-events
41 hs.ghcid
42 #hs.hlint
43 hs.hs-speedscope
44 hs.ormolu
45 hs.profiteur
46 pkgs.git-chglog
47 pkgs.reuse
48 #hs.threadscope
49 #hs.ghc-events-analyze
50 #hs.haskell-language-server
51 #hs.hpc
52 ];
53 buildInputs = [
54 #hs.ghcid
55 pkgs.cabal2nix
56 #hs.hlint
57 #pkgs.nixpkgs-fmt
58 ];
59 inherit withHoogle;
60 };
61 }