]> Git — Sourcephile - haskell/symantic-parser.git/blob - default.nix
build: add `git-chglog`
[haskell/symantic-parser.git] / default.nix
1 { pkgs ? import <nixpkgs> {}
2 , ghc ? "ghc901"
3 , withHoogle ? false
4 , inputs
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 {
13 #symantic-parser = enableExecutableProfiling (doCheck ( hself.callCabal2nix "symantic-parser" ./. {}));
14 # FIXME: this should not be necessary, but haskellPackages.ormolu is currently broken.
15 ormolu = pkgs.ormolu;
16 text-short = dontCheck hsuper.text-short;
17 hs-speedscope = doJailbreak (unmarkBroken hsuper.hs-speedscope);
18 eventlog2html = doJailbreak (unmarkBroken hsuper.eventlog2html);
19 trie-simple = doJailbreak (unmarkBroken hsuper.trie-simple);
20 symantic-base = buildFromSdist (hself.callCabal2nix "symantic-base" inputs.symantic-base {});
21 symantic-parser = doBenchmark (buildFromSdist (hself.callCabal2nix "symantic-parser" ./. {}));
22 /*
23 hlint = hsuper.hlint_3_3_1.overrideScope (self: super: {
24 ghc-lib-parser = overrideCabal self.ghc-lib-parser_9_0_1_20210324 {
25 doHaddock = false;
26 };
27 ghc-lib-parser-ex = self.ghc-lib-parser-ex_9_0_0_4;
28 });
29 */
30 }
31 );
32 in hs.symantic-parser // {
33 shell = hs.shellFor {
34 doBenchmark = true;
35 packages = p: [ p.symantic-parser ];
36 # FIXME: remove when Nixpkgs' haskellPackages.ormolu is no longer broken
37 CABAL_TEST_FLAGS = "-fdisable-ormolu-check";
38 nativeBuildInputs = [
39 hs.cabal-install
40 hs.eventlog2html
41 hs.ghc-events
42 hs.ghcid
43 #hs.hlint
44 hs.hs-speedscope
45 hs.ormolu
46 hs.profiteur
47 pkgs.git-chglog
48 pkgs.reuse
49 #hs.threadscope
50 #hs.ghc-events-analyze
51 #hs.haskell-language-server
52 #hs.hpc
53 ];
54 buildInputs = [
55 #hs.ghcid
56 pkgs.cabal2nix
57 #hs.hlint
58 #pkgs.nixpkgs-fmt
59 ];
60 inherit withHoogle;
61 };
62 }