{"id":15010855,"url":"https://github.com/haskell/ghcup","last_synced_at":"2025-10-19T22:31:22.455Z","repository":{"id":66132121,"uuid":"150830607","full_name":"haskell/ghcup","owner":"haskell","description":"DEPRECATED IN FAVOR OF haskell/ghcup-hs","archived":true,"fork":false,"pushed_at":"2023-01-14T05:27:11.000Z","size":1091,"stargazers_count":263,"open_issues_count":18,"forks_count":24,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-01-31T10:37:34.478Z","etag":null,"topics":["cabal-install","ghc","haskell","installer","posix-sh","shell"],"latest_commit_sha":null,"homepage":"https://github.com/haskell/ghcup-hs","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haskell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-09-29T06:04:06.000Z","updated_at":"2024-08-29T08:26:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"3aa9f779-aa4a-4976-9627-e3f4896a27e1","html_url":"https://github.com/haskell/ghcup","commit_stats":{"total_commits":315,"total_committers":26,"mean_commits":"12.115384615384615","dds":0.2222222222222222,"last_synced_commit":"8f4705a50eefafd92ceef32094eec7140885b3d5"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell%2Fghcup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell%2Fghcup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell%2Fghcup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell%2Fghcup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haskell","download_url":"https://codeload.github.com/haskell/ghcup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237224745,"owners_count":19275079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cabal-install","ghc","haskell","installer","posix-sh","shell"],"created_at":"2024-09-24T19:36:37.279Z","updated_at":"2025-10-19T22:31:17.123Z","avatar_url":"https://github.com/haskell.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"**THIS PROJECT IS NOW DEPRECATED IN FAVOR OF [ghcup-hs](https://gitlab.haskell.org/haskell/ghcup-hs)**\n\n--\n\n`ghcup` makes it easy to install specific versions of `ghc` on GNU/Linux as well as macOS (aka Darwin), and can also bootstrap a fresh Haskell developer environment from scratch.\nIt follows the unix UNIX philosophy of [do one thing and do it well](https://en.wikipedia.org/wiki/Unix_philosophy#Do_One_Thing_and_Do_It_Well).\n\nSimilar in scope to [rustup](https://github.com/rust-lang-nursery/rustup.rs), [pyenv](https://github.com/pyenv/pyenv) and [jenv](http://www.jenv.be).\n\n*Ubuntu users may prefer [hvr's ppa](https://launchpad.net/~hvr/+archive/ubuntu/ghc).*\n\n*This project was started when [CM](https://github.com/capital-match) was switching from stack to [cabal nix-style builds](https://www.haskell.org/cabal/users-guide/nix-local-build-overview.html).*\n\n## Table of Contents\n\n   * [Installation](#installation)\n   * [Usage](#usage)\n     * [Manpages](#manpages)\n   * [Design goals](#design-goals)\n   * [How](#how)\n   * [Known users](#known-users)\n   * [Known problems](#known-problems)\n   * [FAQ](#faq)\n\n## Installation\n\nChoose one of the following installation methods.\n\n### Simple bootstrap of ghcup, GHC and cabal-install\n\n```sh\n# complete bootstrap\ncurl https://gitlab.haskell.org/haskell/ghcup/raw/master/bootstrap-haskell -sSf | sh\n\n# prepare your environment\n. \"$HOME/.ghcup/env\"\necho '. $HOME/.ghcup/env' \u003e\u003e \"$HOME/.bashrc\" # or similar\n\n# now create a project, such as:\nmkdir myproject \u0026\u0026 cd myproject\ncabal init -n --is-executable\ncabal v2-run\n```\n\n### Manual install\n\nJust place the `ghcup` shell script into your `PATH` anywhere.\n\nE.g.:\n\n```sh\n( mkdir -p ~/.ghcup/bin \u0026\u0026 curl https://gitlab.haskell.org/haskell/ghcup/raw/master/ghcup \u003e ~/.ghcup/bin/ghcup \u0026\u0026 chmod +x ~/.ghcup/bin/ghcup) \u0026\u0026 echo \"Success\"\n```\n\nThen adjust your `PATH` in `~/.bashrc` (or similar, depending on your shell) like so, for example:\n\n```sh\nexport PATH=\"$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH\"\n```\n\nSecurity aware users may want to use the files from the [release page](https://gitlab.haskell.org/haskell/ghcup/tags/)\nand verify the gpg signatures.\n\n## Usage\n\nSee `ghcup --help`.\n\nCommon use cases are:\n\n```sh\n# install the last known \"best\" GHC version\nghcup install\n# install a specific GHC version\nghcup install 8.2.2\n# set the currently \"active\" GHC version\nghcup set 8.4.4\n# install cabal-install\nghcup install-cabal\n# update cabal-install\ncabal new-install cabal-install\n```\n\nGenerally this is meant to be used with [`cabal-install`](https://hackage.haskell.org/package/cabal-install), which\nhandles your haskell packages and can demand that [a specific version](https://cabal.readthedocs.io/en/latest/nix-local-build.html#cfg-flag---with-compiler)  of `ghc` is available, which `ghcup` can do.\n\n### Manpages\n\nFor man pages to work you need [man-db](http://man-db.nongnu.org/) as your `man` provider, then issue `man ghc`. Manpages only work for the currently set ghc.\n`MANPATH` may be required to be unset.\n\n## Design goals\n\n1. simplicity\n2. non-interactive\n3. portable\n4. do one thing and do it well (UNIX philosophy)\n\n### Non-goals\n\n1. invoking `sudo`, `apt-get` or *any* package manager\n2. handling system packages\n3. handling cabal projects\n4. being a stack alternative\n\n## How\n\nInstalls a specified GHC version into `~/.ghcup/ghc/\u003cver\u003e`, and places `ghc-\u003cver\u003e` symlinks in `~/.ghcup/bin/`.\n\nOptionally, an unversioned `ghc` link can point to a default version of your choice.\n\nThis uses precompiled GHC binaries that have been compiled on fedora/debian by [upstream GHC](https://www.haskell.org/ghc/download_ghc_8_6_1.html#binaries).\n\nAlternatively, you can also tell it to compile from source (note that this might fail due to missing requirements).\n\nIn addition this script can also install `cabal-install`.\n\n## Known users\n\n* [vabal](https://github.com/Franciman/vabal)\n\n## Known problems\n\n### Limited distributions supported\n\nCurrently only GNU/Linux distributions compatible with the [upstream GHC](https://www.haskell.org/ghc/download_ghc_8_6_1.html#binaries) binaries are supported.\n\n### Precompiled binaries\n\nSince this uses precompiled binaries you may run into\nseveral problems.\n\n#### Missing libtinfo (ncurses)\n\nYou may run into problems with *ncurses* and **missing libtinfo**, in case\nyour distribution doesn't use the legacy way of building\nncurses and has no compatibility symlinks in place.\n\nAsk your distributor on how to solve this or\ntry to compile from source via `ghcup compile \u003cversion\u003e`.\n\n#### Libnuma required\n\nThis was a [bug](https://ghc.haskell.org/trac/ghc/ticket/15688) in the build system of some GHC versions that lead to\nunconditionally enabled libnuma support. To mitigate this you might have to install the libnuma\npackage of your distribution. See [here](https://gitlab.haskell.org/haskell/ghcup/issues/58) for a discussion.\n\n### Compilation\n\nAlthough this script can compile GHC for you, it's just a very thin\nwrapper around the build system. It makes no effort in trying\nto figure out whether you have the correct toolchain and\nthe correct dependencies. Refer to [the official docs](https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux)\non how to prepare your environment for building GHC.\n\n## FAQ\n\n1. Why reimplement stack?\n\nghcup is not a reimplementation of stack. The only common part is automatic installation of GHC, but even that differs in scope and design.\n\n2. Why not contribute to stack and create a library for the common part?\n\nWhile this might be an interesting idea, ghcup is about simplicity.\n\n3. Why write a \u003e1000k LOC bash script?\n\nghcup is POSIX sh.\n\n4. Why write a \u003e1000k LOC POSIX sh script?\n\nMainly because the implementation is fairly straight-forward and the script is highly portable. No need to bootstrap anything or set up yet another CI to build ghcup binaries for all possible arches and distros just to perform a very simple task: identify distro and platform and download a GHC bindist.\n\n5. Why not support windows?\n\nConsider using [Chocolatey](https://chocolatey.org/search?q=ghc) or [ghcups](https://github.com/kakkun61/ghcups).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell%2Fghcup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaskell%2Fghcup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell%2Fghcup/lists"}