1 { pkgs ? import <nixpkgs> {}
2 , ghc ? null # "ghc8102"
8 then pkgs.haskellPackages
9 else pkgs.haskell.packages.${ghc};
10 hs = haskellPackages.extend (with pkgs.haskell.lib;
13 mkDerivation = drv: hsuper.mkDerivation (
14 # There is no much cache for other ghc,
15 # hence build as little as possible.
16 drv // pkgs.lib.optionalAttrs (ghc != null) {
17 enableLibraryProfiling = false;
23 # Enable check here so that symantic-parser.getCabalDeps contains testHaskellDepends,
24 # which are needed in the shell to run:
25 # cabal repl --enable-tests symantic-parser-test
26 # Wrapping symantic-parser in a doCheck (hence using overrideCabal) would not work.
27 # And I have no idea why the version suffix must also be included.
28 doCheck = builtins.match "symantic-parser.*" drv.pname != null;
33 symantic-base = hself.callCabal2nix "symantic-base" (pkgs.fetchgit {
34 url = "git://git.sourcephile.fr/haskell/symantic-base";
35 sha256 = "sha256-I636Kl+S93BDX1xrEMQdf217pLeT6FeF4BBpj83sEgQ=";
38 symantic-parser = enableExecutableProfiling (doCheck (
39 hself.callCabal2nix "symantic-parser" ./. {}));
41 packageSourceOverrides {
42 # symantic-parser = ./.;
45 in hs.symantic-parser // {
47 packages = p: [ p.symantic-parser ];
50 hs.haskell-language-server