{"id":13702244,"url":"https://github.com/phadej/cabal-extras","last_synced_at":"2025-04-06T02:07:45.708Z","repository":{"id":36535844,"uuid":"222278545","full_name":"phadej/cabal-extras","owner":"phadej","description":"A tool suite to aid Haskell development using `cabal-install`","archived":false,"fork":false,"pushed_at":"2024-12-08T17:51:25.000Z","size":4739,"stargazers_count":85,"open_issues_count":26,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T01:05:45.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/phadej.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":"2019-11-17T16:35:31.000Z","updated_at":"2025-03-11T05:23:18.000Z","dependencies_parsed_at":"2024-01-14T19:21:11.312Z","dependency_job_id":"d1448d25-a952-4095-a5a9-726e8a855ad6","html_url":"https://github.com/phadej/cabal-extras","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fcabal-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fcabal-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fcabal-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fcabal-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phadej","download_url":"https://codeload.github.com/phadej/cabal-extras/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423513,"owners_count":20936626,"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-08-02T21:00:32.745Z","updated_at":"2025-04-06T02:07:45.691Z","avatar_url":"https://github.com/phadej.png","language":"Haskell","funding_links":[],"categories":["Cabal Assistants"],"sub_categories":["Talks"],"readme":"# cabal-extras\n\nA tool suite to aid Haskell development using `cabal-install`.\nThere are four tools in this repository:\n- `cabal-env`: An experiment on what `cabal install --lib` could be.\n- `cabal-diff`: Compare API of different package versions\n- `cabal-bundler`: (ab)use `cabal-install` solver to build standalone installation bundles\n- `cabal-deps`: An experiment on what `cabal outdated` could be.\n- `cabal-store-check`: A naive tool to try to repair cabal's nix-store\n\nAll tools are highly experimental, although I (Oleg Grenrus) use them daily.\n\nThere's also [`cabal-fmt`](https://hackage.haskell.org/package/cabal-fmt), a `.cabal` file formatter, but it's more standalone tool.\n\n# Installation\n\nTo install individual executables from this repository,\n\n1. Make sure you have `GHC-8.2` and `cabal-install-3.0` or later installed.\n2. Clone it with `git clone https://github.com/phadej/cabal-extras.git`\n3. Install individual executables with `make install-cabal-env`, `make install-cabal-deps` etc.\n\nYou can pass flags to `cabal install` by setting `INSTALL_FLAGS`, e.g.\n\n```\nmake INSTALL_FLAGS=\"--installdir $HOME/bin --install-method copy\" install-cabal-env\n```\n\n# Executables\n\n## cabal-bundler\n\nTBW\n\n## cabal-diff\n\nTBW\n\n## cabal-deps\n\nTBW\n\n## cabal-env\n\n### Synopsis\n\n```\n$ cabal-env optics\n$ ghci\nPrelude\u003e import Optics\nPrelude Optics\u003e\n```\n\nTBW\n\n## cabal-store-check\n\nThis is a small script which can find some broken packages in cabal nix-store.\nIt's a proof-of-concept of\n\n- https://gitlab.haskell.org/ghc/ghc/merge_requests/2284\n- https://github.com/haskell/cabal/issues/6060\n\n### Synopsis\n\n```\n# Check if store package db is inconsistent\n$ cabal-store-check\n...\n[   0.64132] error: haskell-ci-0.3.20190327-98543f1828739a9ad62f8722220f5d812f7f4a13f6fe2745a286c227593452b9 interface file for HaskellCI is missing\n...\n\n# You can remove broken packages with, which would repair the state\n$ cabal-store-check --repair\n```\n\n## cabal-store-gc\n\nThis is another small script to reduce size of cabal's nix-store.\n\n### Synopsis\n\n```bash\n# Add possible current projects dependencies as in direct root,\n# and print reclaiming information\n$ cabal-store-gc\n...\n...\n[  16.89166] info: 262 components are referenced from the roots\n[  16.89714] info: 183 components are in the store\n[  16.89726] info: 393 components can be removed from the store\n[  17.71338] info: 2328 MB can be freed\n\n# If you want to perform the cleanup\n$ cabal-store-gc --collect\n\n# For more information, see\n$ cabal-store-gc --help\n```\n\n### Roots\n\nThere are three kind of roots, which retain the packages in the store:\n\n- executables in `installdir`. These are automatic roots.\n- packages references from environments in `~/.ghc/.../environments/...`. These are also automatic roots.\n- indirect roots, which are links from `~/.cabal/store/roots` to `plan.json`s\n  elsewhere in the file system. Indirect links allow to retain development\n  project dependencies.\n  New indirect roots can be added with `--add-project-root` or `--add-root` actions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphadej%2Fcabal-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphadej%2Fcabal-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphadej%2Fcabal-extras/lists"}