1 { pkgs ? import <nixpkgs> {}
2 , ghc ? null #"ghc8102"
4 #, symantic-base ? null
9 then pkgs.haskellPackages
10 else pkgs.haskell.packages.${ghc};
11 hs = haskellPackages.extend (with pkgs.haskell.lib;
14 mkDerivation = drv: hsuper.mkDerivation (
15 # There is no much cache for other ghc,
16 # hence build as little as possible.
17 drv // pkgs.lib.optionalAttrs (ghc != null) {
18 enableLibraryProfiling = false;
24 # Enable check here so that symantic-parser.getCabalDeps contains testHaskellDepends,
25 # which are needed in the shell to run:
26 # cabal repl --enable-tests symantic-parser-test
27 # Wrapping symantic-parser in a doCheck (hence using overrideCabal) would not work.
28 # And I have no idea why the version suffix must also be included.
29 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=";
37 symantic-parser = enableExecutableProfiling (doCheck (hself.callCabal2nix "symantic-parser" ./. {}));
39 packageSourceOverrides {
40 # symantic-parser = ./.;
43 in hs.symantic-parser // {
45 packages = p: [ p.symantic-parser ];
48 hs.haskell-language-server