]> Git — Sourcephile - haskell/symantic-parser.git/blob - default.nix
nix: cleanup
[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 symantic-parser = buildFromSdist (hself.callCabal2nix "symantic-parser" ./. {});
16 }
17 );
18 in hs.symantic-parser // {
19 shell = hs.shellFor {
20 packages = p: [ p.symantic-parser ];
21 nativeBuildInputs = [
22 hs.cabal-install
23 #hs.ghc-events
24 #hs.ghc-events-analyze
25 #hs.threadscope
26 #hs.haskell-language-server
27 #hs.hpc
28 ];
29 buildInputs = [
30 #hs.ghcid
31 pkgs.ormolu
32 pkgs.cabal2nix
33 #hs.hlint
34 #pkgs.nixpkgs-fmt
35 ];
36 inherit withHoogle;
37 };
38 }