Skip to content

Instantly share code, notes, and snippets.

@pbogdan
Created March 21, 2018 15:43
Show Gist options
  • Save pbogdan/4b3b9208004903d0c512d5a178e93950 to your computer and use it in GitHub Desktop.
Save pbogdan/4b3b9208004903d0c512d5a178e93950 to your computer and use it in GitHub Desktop.
nixpkgs.config.packageOverrides = pkgs: rec {
haskellEnv =
pkgs.haskellPackages.ghcWithPackages (ghcPkgs:
with ghcPkgs; with pkgs.haskell.lib; [
# pkgs.haskell.packages.ghc802.ghc-mod
(let src = pkgs.fetchFromGitHub {
owner = "DanielG";
repo = "ghc-mod";
rev = "9f44a7f3e082c860fab0190a13265ec65ee35987";
sha256 = "0qkwbk816w26wadwv2r16xjdfvr6bz5xyi3sn7hbvczdhg3c0xad";
};
ghc-mod-core = (doJailbreak (callPackage ./packages/ghc-mod-core.nix {
inherit src;
}));
in (doJailbreak (callPackage ./packages/ghc-mod.nix {
inherit ghc-mod-core src;
})))
...
]);
environment.systemPackages = with pkgs; [
haskellEnv
];
{ mkDerivation, base, binary, bytestring, cabal-helper, containers
, deepseq, directory, djinn-ghc, extra, fclabels, filepath
, fingertree, ghc, ghc-boot, ghc-paths, ghc-syb-utils
, haskell-src-exts, hlint, monad-control, monad-journal, mtl
, old-time, optparse-applicative, pipes, process, safe, semigroups
, split, stdenv, syb, template-haskell, temporary, text, time
, transformers, transformers-base
, src
}:
mkDerivation {
pname = "ghc-mod-core";
inherit src;
version = "5.9.0.0";
postUnpack = "sourceRoot=source/core";
libraryHaskellDepends = [
base binary bytestring cabal-helper containers deepseq directory
djinn-ghc extra fclabels filepath fingertree ghc ghc-boot ghc-paths
ghc-syb-utils haskell-src-exts hlint monad-control monad-journal
mtl old-time optparse-applicative pipes process safe semigroups
split syb template-haskell temporary text time transformers
transformers-base
];
homepage = "https://github.com/DanielG/ghc-mod";
description = "Happy Haskell Hacking";
license = stdenv.lib.licenses.agpl3;
}
{ mkDerivation, base, binary, bytestring, Cabal, cabal-doctest
, cabal-helper, containers, deepseq, directory, djinn-ghc, doctest
, extra, fclabels, filepath, ghc, ghc-boot, ghc-mod-core, ghc-paths
, ghc-syb-utils, haskell-src-exts, hlint, hspec, monad-control
, monad-journal, mtl, old-time, optparse-applicative, pipes
, process, safe, semigroups, split, stdenv, syb, template-haskell
, temporary, text, time, transformers, transformers-base
, src
}:
mkDerivation {
pname = "ghc-mod";
version = "5.9.0.0";
inherit src;
doCheck = false;
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
enableSharedExecutables = false;
setupHaskellDepends = [ base Cabal cabal-doctest ];
libraryHaskellDepends = [
base binary bytestring cabal-helper containers deepseq directory
djinn-ghc extra fclabels filepath ghc ghc-boot ghc-mod-core
ghc-paths ghc-syb-utils haskell-src-exts hlint monad-control
monad-journal mtl old-time optparse-applicative pipes process safe
semigroups split syb template-haskell temporary text time
transformers transformers-base
];
executableHaskellDepends = [
base binary deepseq directory fclabels filepath ghc ghc-mod-core
monad-control mtl old-time optparse-applicative process semigroups
split time
];
testHaskellDepends = [
base cabal-helper containers directory doctest fclabels filepath
ghc ghc-boot ghc-mod-core hspec monad-journal mtl process split
temporary transformers
];
homepage = "https://github.com/DanielG/ghc-mod";
description = "Happy Haskell Hacking";
license = stdenv.lib.licenses.agpl3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment