-
-
Save bitemyapp/cb0a30e0080f8d1653e1 to your computer and use it in GitHub Desktop.
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
| # This template will give you a prompt with: | |
| # - ghc | |
| # - cabal | |
| # - ghc-mod | |
| # - the libraries: free, mtl, transformers | |
| # | |
| # to run: nix-shell haskell-project.nix | |
| # | |
| # to specify specific version of haskell, you can: | |
| # nix-shell --arg haskellPackages 'with import <nixpkgs> {}; haskellPackages_ghc783_profiling' | |
| # (I think) to specify a specific set of nixpkgs via nix channel | |
| # 1. nix-channel --add http://nixos.org/channels/name my-new-nixos-channel | |
| # 2. nix-channel --update | |
| # 3. nix-shell --args nixpkgs 'import <my-new-nixos-channel> {}' | |
| { nixpkgs ? (import <nixpkgs> {}) | |
| , haskell ? (import <nixpkgs> {}).haskellPackages }: | |
| let | |
| myEnvFun = nixpkgs.myEnvFun; | |
| cabalInstall = haskell.cabalInstall; | |
| free = haskell.free; | |
| ghc = haskell.ghc; | |
| ghcmod = haskell.ghcMod; | |
| mtl = haskell.mtl; | |
| transformers = haskell.transformers; | |
| in rec { | |
| tmpEnv = myEnvFun {· | |
| name = "tmp-haskell-project-env"; | |
| buildInputs = [ | |
| # build tools | |
| cabalInstall | |
| ghc | |
| ghcmod | |
| # libs | |
| free | |
| mtl | |
| transformers | |
| ]; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment