Created
June 10, 2015 20:39
-
-
Save benkolera/e864c96b39a028f06cc8 to your computer and use it in GitHub Desktop.
Overriding ghc-mod and creating non-hackage nixpkgs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ben at Bens-MacBook-Pro in ~ | |
| $ cat ~/.nixpkgs/haskell/ghc-mod.nix | |
| { mkDerivation, async, base, bytestring, cabal-helper, cereal | |
| , containers, data-default, deepseq, directory, djinn-ghc, doctest | |
| , emacs, fetchgit, filepath, ghc, ghc-paths, ghc-syb-utils | |
| , haskell-src-exts, hlint, hspec, makeWrapper, monad-control | |
| , monad-journal, mtl, old-time, pretty, process, split, stdenv, syb | |
| , temporary, text, time, transformers, transformers-base | |
| }: | |
| mkDerivation { | |
| pname = "ghc-mod"; | |
| version = "0"; | |
| src = fetchgit { | |
| url = "git://github.com/kazu-yamamoto/ghc-mod.git"; | |
| sha256 = "b444ff17d0e97fae5f81dfd4b708ae7c79c833505f8a1b26e004e1106a2569e5"; | |
| rev = "b52c0a5d767282369f2748c5ec070b802ed8e23c"; | |
| }; | |
| isLibrary = true; | |
| isExecutable = true; | |
| buildDepends = [ | |
| async base bytestring cabal-helper cereal containers data-default | |
| deepseq directory djinn-ghc filepath ghc ghc-paths ghc-syb-utils | |
| haskell-src-exts hlint monad-control monad-journal mtl old-time | |
| pretty process split syb temporary text time transformers | |
| transformers-base | |
| ]; | |
| testDepends = [ base doctest hspec ]; | |
| buildTools = [ emacs makeWrapper ]; | |
| doCheck = false; | |
| configureFlags = "--datasubdir=ghc-mod-0"; | |
| postInstall = '' | |
| cd $out/share/ghc-mod-0 | |
| make | |
| rm Makefile | |
| cd .. | |
| ensureDir "$out/share/emacs" | |
| mv ghc-mod-0 emacs/site-lisp | |
| ''; | |
| homepage = "http://www.mew.org/~kazu/proj/ghc-mod/"; | |
| description = "Happy Haskell Programming"; | |
| license = stdenv.lib.licenses.agpl3; | |
| } | |
| -- Then override the old ghc-mod in your base config: | |
| ben at Bens-MacBook-Pro in ~ | |
| $ less ~/.nixpkgs/config.nix | |
| { pkgs }: { | |
| haskellPackageOverrides = with pkgs.haskell-ng.lib; self: super: { | |
| zip-archive = dontCheck super.zip-archive; | |
| cabal-helper = dontCheck super.cabal-helper; | |
| ghc-mod = pkgs.haskellngPackages.callPackage ./haskell/ghc-mod.nix {}; | |
| reflex = pkgs.haskellngPackages.callPackage ./haskell/reflex/default.nix {}; | |
| reflex-dom = pkgs.haskellngPackages.callPackage ./haskell/reflex-dom/default.nix {}; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment