{"id":13799032,"url":"https://github.com/NixOS/cabal2nix","last_synced_at":"2025-05-13T06:31:56.798Z","repository":{"id":1600623,"uuid":"2161031","full_name":"NixOS/cabal2nix","owner":"NixOS","description":"Generate Nix build instructions from a Cabal file","archived":false,"fork":false,"pushed_at":"2025-04-30T18:08:53.000Z","size":3419,"stargazers_count":370,"open_issues_count":89,"forks_count":155,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-05-05T19:23:37.147Z","etag":null,"topics":["cabal","cabal2nix","hackage","haskell","nix","nixpkgs"],"latest_commit_sha":null,"homepage":"https://nixos.org/manual/nixpkgs/unstable/#haskell","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"enthought/traitsui","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NixOS.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,"zenodo":null},"funding":{"open_collective":"nixos"}},"created_at":"2011-08-05T15:31:37.000Z","updated_at":"2025-04-30T18:08:58.000Z","dependencies_parsed_at":"2025-04-11T01:50:22.932Z","dependency_job_id":null,"html_url":"https://github.com/NixOS/cabal2nix","commit_stats":{"total_commits":2274,"total_committers":127,"mean_commits":"17.905511811023622","dds":"0.20976253298153036","last_synced_commit":"cc5c0285bac65da2be0afd123f1cee94104c25fd"},"previous_names":[],"tags_count":140,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fcabal2nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fcabal2nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fcabal2nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fcabal2nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NixOS","download_url":"https://codeload.github.com/NixOS/cabal2nix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253366671,"owners_count":21897383,"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","cabal2nix","hackage","haskell","nix","nixpkgs"],"created_at":"2024-08-04T00:00:58.052Z","updated_at":"2025-05-13T06:31:55.967Z","avatar_url":"https://github.com/NixOS.png","language":"Haskell","funding_links":["https://opencollective.com/nixos"],"categories":["Haskell","Programming Languages"],"sub_categories":["Haskell"],"readme":"# The cabal2nix monorepo\n\n![Continous Integration](https://github.com/NixOS/cabal2nix/workflows/Haskell-CI/badge.svg)\n\n## Components\n\n### cabal2nix\n\nTool that generates Nix build instructions from a Cabal file. Also contains\nhackage2nix, the tool that generates the `haskellPackages` set in nixpkgs.\n\n### distribution-nixpkgs\n\nUtility library implementing nixpkgs-specific tasks and concepts: Looking\nup packages, `meta` sets, Nix-style integrity hashes etc.\n\n### language-nix\n\nSimplistic library to parse and render a subset of the Nix language.\n\n### hackage-db\n\nLibrary for working with the Hackage database created and updated\nusing `cabal update`.\n\n## Development\n\nAt the top-level, a `cabal.project` and `shell.nix` are provided for working\non all packages in the repository. You can use `direnv` and (optionally)\nlorri to make the environment available in your normal shell as well.\n\n## Maintenance\n\nThe monorepo has been assembled using [josh]. You can obtain it from nixpkgs\nusing `nix-shell -p josh`. Below, some common tasks are documented.\n\n### Extracting the original git history\n\n[josh]'s history filtering capabilities are quite powerful, allowing us to\nextract the original git histories of the repositories that have been vendored\nin. For example, for `distribution-nixpkgs`:\n\n```console\n$ josh-filter ':/distribution-nixpkgs'\n$ git checkout FILTERED_HEAD\n$ ls *.cabal\ndistribution-nixpkgs.cabal\n```\n\nThe `FILTERED_HEAD` ref has the original `HEAD` of the `distribution-nixpkgs`\n`HEAD` when it was vendored as its ancestor and can thus be pushed to the\noriginal repository.\n\n\n### Vendoring components\n\nThis probably won't come up in the future, but the process that was used to\nvendor the additional libraries is documented here:\n\n```console\n$ name=…\n$ git fetch https://github.com/nixos/$name.git\n$ josh-filter \":prefix=$name\" FETCH_HEAD\n$ git merge --allow-unrelated-histories FILTERED_HEAD -m \"$name: subtree upstream repo\"\n```\n\nAlso refer to the relevant [josh\ndocumentation](https://josh-project.github.io/josh/guide/importing.html).\n\n[josh]: https://josh-project.github.io/josh/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNixOS%2Fcabal2nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNixOS%2Fcabal2nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNixOS%2Fcabal2nix/lists"}