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
40 bifunctors = doJailbreak hsuper.bifunctors;
41 attoparsec = doJailbreak hsuper.attoparsec;
42 assoc = doJailbreak hsuper.assoc;
43 vector-binary-instances = doJailbreak hsuper.vector-binary-instances;
44 vector-th-unbox = doJailbreak hsuper.vector-th-unbox;
45 these = doJailbreak hsuper.these;
46 quickcheck-instances = doJailbreak hsuper.quickcheck-instances;
47 binary-orphans = doJailbreak hsuper.binary-orphans;
48 text-short = doJailbreak hsuper.text-short;
49 aeson = doJailbreak hsuper.aeson;
51 #HsYAML = doJailbreak hsuper.HsYAML;
52 #gitrev = doJailbreak hsuper.gitrev;
53 #ghc-source-gen = doJailbreak hsuper.ghc-source-gen;
54 data-fix = doJailbreak hsuper.data-fix;
55 primitive = doJailbreak hsuper.primitive;
56 assoc = doJailbreak hsuper.assoc;
57 these = doJailbreak hsuper.these;
59 symantic-parser = enableExecutableProfiling (doCheck (
60 hself.callCabal2nix "symantic-parser" ./. {}));
62 packageSourceOverrides {
63 # symantic-parser = ./.;
66 in hs.symantic-parser // {
68 packages = p: [ p.symantic-parser ];
72 #hs.haskell-language-server