Skip to content

Instantly share code, notes, and snippets.

@meditans
Created August 6, 2015 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meditans/82ded9101c55eb5884d7 to your computer and use it in GitHub Desktop.
Save meditans/82ded9101c55eb5884d7 to your computer and use it in GitHub Desktop.
Nix - selectively profiling libraries
{ pkgs }: {
allowUnfree = true;
packageOverrides = super: let self = super.pkgs; in {
haskellPackages = super.haskellPackages.override {
overrides = self: super: {
mkDerivation = drv: super.mkDerivation (drv // {enableLibraryProfiling = true;});
ghc-mod = self.callPackage /home/meditans/code/haskell/ghc-mod/default.nix {};
cabal-helper = self.callPackage /home/meditans/code/haskell/cabal-helper-0.3.4.0/default.nix {};
};
};
haskellEnv = self.haskellPackages.ghcWithPackages
(haskellPackages: with haskellPackages; [
cabal2nix
cabal-install
stylish-haskell
ghc-mod
hindent
structured-haskell-mode
present
]);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment