{"id":20761984,"url":"https://github.com/composewell/streamly-packages","last_synced_at":"2026-04-21T17:01:49.003Z","repository":{"id":150890984,"uuid":"569705360","full_name":"composewell/streamly-packages","owner":"composewell","description":"A nix-shell derivation for streamly ecosystem packages","archived":false,"fork":false,"pushed_at":"2024-10-11T11:03:07.000Z","size":67,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-18T05:33:48.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/composewell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-23T12:36:51.000Z","updated_at":"2024-07-11T21:25:49.000Z","dependencies_parsed_at":"2023-04-10T15:32:53.230Z","dependency_job_id":null,"html_url":"https://github.com/composewell/streamly-packages","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/composewell%2Fstreamly-packages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/composewell%2Fstreamly-packages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/composewell%2Fstreamly-packages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/composewell%2Fstreamly-packages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/composewell","download_url":"https://codeload.github.com/composewell/streamly-packages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243076865,"owners_count":20232492,"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":[],"created_at":"2024-11-17T10:28:32.330Z","updated_at":"2026-04-21T17:01:48.998Z","avatar_url":"https://github.com/composewell.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nix Shell for Haskell Development\n\nA ready-to-use Nix shell environment tailored for Haskell, having\nHaskell Streamly and its ecosystem packages installed out of the\nbox. Easily customizable to include any package from Hackage.\n**Includes:**\n\n* `nvim`: Stylish Vim IDE with plugins\n* `codium`: Visual Studio Code with extensions\n* `ghc`: the Haskell compiler\n* `cabal`: the Haskell project build tool\n* HLS: the Haskell language server\n* Hoogle server for searchable documentation\n* Essential Haskell development tools\n* Streamly ecosystem libraries\n\nThe version of `nixpkgs` can be changed in the [default.nix](default.nix) or\n[flake.nix](flake.nix) files whichever you use.\n\nPlease refer to\n[this page](https://haskell-language-server.readthedocs.io/en/latest/features.html)\nfor Haskell language server features.\n\n# Starting the Shell\n\nThere are two ways to start the nix shell.\n\n## Directly using github URL\n\nTo get a shell with the development environment installed in it, use the\nfollowing command:\n\n```\nnix-shell https://github.com/composewell/streamly-packages/archive/master.tar.gz\n```\n\nIf it takes too long to build the hoogle file you can disable hoogle:\n\n```\nnix-shell --arg hoogle false ...\n```\n\nUse the cloning method if you would like to customize the environment\nbefore using. For example, if it is using too much space\ninstalling packages that you do not need.\n\n## By cloning the github repo\n\nYou can clone the `streamly-packages` repo and run `nix-shell`\ncommand from the repo root directory.\n\n```\ngit clone https://github.com/composewell/streamly-packages\ncd streamly-packages\nnix-shell\n```\n\nYou can comment out any packages you do not need in\n[packages.nix](packages.nix).\n\n# Using the Shell\n\nOnce you are in the shell, you can use `ghc`, `cabal`, `nvim`, `codium`,\n`hoogle`, and other CLI tools from the PATH. Essential streamly packages\nare pre-installed in the `ghc` package database, ready to use.\n\nTo start with, you can try building and running the examples from the\n[streamly-examples](https://github.com/composewell/streamly-examples/tree/v0.3.0/examples)\npackage.\n\nAlternatively, you can start the interactive repl `ghci` and play with Haskell\ncode interactively.\n\n# Show installed packages\n\nTo show the Haskell packages that are already installed in the shell,\nrun the following command in the nix shell:\n\n```\nghc-pkg list\n```\n\n# Building a Haskell Package\n\n\u003c!--\nWe do not depend on cabal to download and build the dependencies.  Do\nnot use `cabal update` to avoid building the dependencies.  Instead add\nyour dependencies in [packages.nix](packages.nix), the dependencies are\npre-installed in the shell from nixpkgs.\n\nIt uses `$HOME/.config/streamly-packages` as the CABAL_DIR to avoid\nbuilding packages using cabal. If by mistake you run the `cabal update`\ncommand then cabal may start building dependencies instead of using\nfrom nixpkgs. If you did not intend to do that then you can remove the\nhackage database index from `$HOME/.config/streamly-packages` or remove\nthat entire directory itself.\n--\u003e\n\nWe do not depend on cabal to download and build the dependencies.\nInstead add your project dependencies in the library section of\n[packages.nix](packages.nix), any package specified here and all its\ndependencies are pre-installed in the shell from nixpkgs.\n\nFor example to build the streamly-examples package:\n```\ngit clone https://github.com/composewell/streamly-examples\ncd streamly-examples\ncabal build\n```\n\n# Overriding package versions\n\nTo override or update the versions of Haskell packages used, edit the\n[sources.nix](sources.nix) file to specify\nparticular git commit ids or package versions from hackage to be used.\n\n\u003c!--\nChanging a package version may break other packages dependent on the changed\npackage. If you do not need the broken packages you can comment those in\n[default.nix](default.nix). Otherwise change the versions of the broken\npackages as well accordingly.\n--\u003e\n\n# Adding your own packages\n\nIf you need any additional packages in this environment just add\nthem to the list of packages in [packages.nix](packages.nix).\n\n# Accessing the documentation\n\nInside the nix shell, run the following command:\n\n```\nhoogle server --local -p 8080\n```\n\nOpen the URL `http://127.0.0.1:8080` in your browser.\n\n# Using vim editor\n\nInside the nix shell, run the following command:\n\n```\nnvim\n```\n\nUse `ESC :q` to quit.\nUse `,h` for help.\nUse `:colorscheme morning` if you want a light theme.\n\nAdd the following to your `$HOME/.config/nvim/coc-settings.json` to use the\nhaskell language server with nvim:\n\n```\n{\n  \"languageserver\": {\n    \"haskell\": {\n      \"command\": \"haskell-language-server-wrapper\",\n      \"args\": [\"--lsp\"],\n      \"rootPatterns\": [\"*.cabal\", \"stack.yaml\", \"cabal.project\", \"package.yaml\", \"hie.yaml\"],\n      \"filetypes\": [\"haskell\", \"lhaskell\"],\n      \"settings\": {\n        \"haskell\": {\n          \"checkParents\": \"CheckOnSave\",\n          \"checkProject\": true,\n          \"formattingProvider\": \"fourmolu\"\n        }\n      }\n    }\n  }\n}\n```\n\nTo customize vim plugins see\n[nixpack-editors](https://github.com/composewell/nixpack-editors), fork\nand edit that repo and change its git URL in [packages.nix](package.nix).\n\n# Using VSCode editor\n\nTo run VSCodium, the open source version of Microsoft VSCode, run the\nfollowing command in the nix-shell:\n\n```\ncodium\n```\n\nIf you have started the nix-shell with `haskell-tools` included, you\nwill have the Haskell Language Server installed in the shell.  If you\nget a pop up saying: \"How do you want the extension to manage/discover\nHLS and the relevant toolchain?\" just choose, \"Manually via PATH\".\n\nYou can also set it later in the following section in settings:\n  * Extensions\n    * Haskell\n      * Manage HLS\n        * PATH\n\nIf you wish to use your existing installation of VSCode instead of\n`codium` from the nix-shell, you can do that too, just make sure to run\nit from within the nix-shell so that it is able to use the installed\nHaskell tools and libraries. For example, on MacOS, if you have your\nvscode app in `Downloads` folder:\n\n```\nopen ~/Downloads/Visual\\ Studio\\ Code.app\n```\n\nTo customize vscode extensions see\n[nixpack-editors](https://github.com/composewell/nixpack-editors), fork\nand edit that repo and change its git URL in [packages.nix](package.nix).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomposewell%2Fstreamly-packages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomposewell%2Fstreamly-packages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomposewell%2Fstreamly-packages/lists"}