Last active
October 27, 2020 12:03
-
-
Save alter2000/9bab3ef1f7d952db40447a1059319a4d to your computer and use it in GitHub Desktop.
quicc install haskell stacc for epitecc
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
| # install nix | |
| # logout then login | |
| # add said file to ~/.config/nixpkgs/overlays/haskell.nix | |
| # NOT NEEDED ANYMORE: add `{ allowBroken = true; }` to ~/.config/nixpkgs/config.nix | |
| nix-channel --list | |
| ## should _NOT_ have nixpkgs-unstable in output, else do | |
| nix-channel --add https://nixos.org/channels/nixpkgs nixpkgs | |
| # install pkgset | |
| nix-env -iA nixpkgs.haskellPkgs | |
| # any other time to clear all other packages and update | |
| nix-env-hs |
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
| self: super: | |
| let | |
| unstable = import (fetchTarball "channel:nixpkgs-unstable") { inherit (self) config; }; | |
| in | |
| { | |
| haskellPkgs = ( super.haskellPkgs or {} ) // { | |
| nix-env-hs = super.writeScriptBin "nix-env-hs" '' | |
| #!${super.stdenv.shell} | |
| if ! command -v nix-env &>/dev/null; then | |
| echo "warning: nix-env was not found in PATH, add nix to userPackages" >&2 | |
| PATH=${self.nix}/bin:$PATH | |
| fi | |
| PENV=( | |
| haskellPkgs | |
| ) | |
| exec nix-env -f '<nixpkgs>' -r -iA \ | |
| ''${PENV[@]} \ | |
| "$@" | |
| ''; | |
| env = self.haskellPackages.ghcWithHoogle (ps: with ps; [ | |
| hasktags | |
| stylish-haskell | |
| async | |
| bytestring | |
| filepath | |
| mtl | |
| text | |
| ]); | |
| inherit (self) hlint cabal-install cabal2nix stack; | |
| inherit (unstable.haskellPackages) implicit-hie haskell-language-server; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment