1 { pkgs ? import <nixpkgs> {}
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 # Relax upper bound to support ghc-9.0.1
39 bifunctors = doJailbreak hsuper.bifunctors;
40 attoparsec = doJailbreak hsuper.attoparsec;
41 assoc = doJailbreak hsuper.assoc;
42 vector-binary-instances = doJailbreak hsuper.vector-binary-instances;
43 vector-th-unbox = doJailbreak hsuper.vector-th-unbox;
44 these = doJailbreak hsuper.these;
45 quickcheck-instances = doJailbreak hsuper.quickcheck-instances;
46 binary-orphans = doJailbreak hsuper.binary-orphans;
47 text-short = doJailbreak hsuper.text-short;
48 aeson = doJailbreak hsuper.aeson;
49 symantic-parser = enableExecutableProfiling (doCheck (
50 hself.callCabal2nix "symantic-parser" ./. {}));
52 packageSourceOverrides {
53 # symantic-parser = ./.;
56 in hs.symantic-parser // {
58 packages = p: [ p.symantic-parser ];
61 #hs.haskell-language-server