Skip to content

Instantly share code, notes, and snippets.

@LnL7
Forked from gilligan/config.nix
Last active August 29, 2015 14:22
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 LnL7/aa6860dbd754a70a0661 to your computer and use it in GitHub Desktop.
Save LnL7/aa6860dbd754a70a0661 to your computer and use it in GitHub Desktop.
{ pkgs }:
{
allowBroken = true;
allowUnfree = true;
haskellPackageOverrides = self : super : (let inherit (pkgs.haskell-ng) lib; in {
ghc-mod = lib.overrideCabal super.ghc-mod (oldAttrs: {
src = pkgs.fetchgit {
url = https://github.com/kazu-yamamoto/ghc-mod;
rev = "247e4e0e7616fe1fecc68fdcf80d6249ac4cee4f";
sha256 = "2a23271d0e6907351a246f095040ba18c3ab6bf1cba08a14338d701defa55474";
};
buildDepends = oldAttrs.buildDepends ++ [ self.cabal-helper self.cereal ];
patchPhase = "${pkgs.gnused}/bin/sed -i 's/Version:\ *0/Version:5.0.1.1/' ghc-mod.cabal";
});
cabal-helper = lib.overrideCabal super.cabal-helper (oldAttrs: {
version = "0.3.2.0";
sha256 = "06igjmr0n8418wid1pr74cgvlsmwni7ar72g9bddivlbxax1pfli";
});
halive = self.callPackage ./haskell/halive {};
});
packageOverrides = pkgs : rec {
devTools = with pkgs; buildEnv {
name = "devTools";
paths = [
neovim
zeal
];
};
ghcEnv = pkgs.haskellngPackages.ghcWithPackages (p : with p; [
alex
cabal2nix
cabal-install
codex
ghc
ghcid
ghc-mod
halive
hasktags
hdevtools
hlint
happy
hoogle
hspec
purescript
]);
nodeEnv = with pkgs; buildEnv {
name = "node";
paths = [
nodejs
] ++ (with nodePackages; [
npm2nix
]);
};
};
}
nix-search(){ nix-env -qa \* -P | grep -i "$1" }
nix-shell-ghc() { nix-shell -E 'with (import <nixpkgs> {}).pkgs; (haskellngPackages.callPackage ./default.nix {}).env' "$@" }
nix-shell-ghc-with() { nix-shell -E "(import <nixpkgs> {}).haskellPackages.ghcWithPackages (p: with p; [ ghc $@ ])" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment