{"id":13688003,"url":"https://github.com/srid/haskell-flake","last_synced_at":"2025-04-04T10:04:09.717Z","repository":{"id":39615611,"uuid":"497945488","full_name":"srid/haskell-flake","owner":"srid","description":"A `flake-parts` Nix module for Haskell development","archived":false,"fork":false,"pushed_at":"2025-03-23T15:21:43.000Z","size":578,"stargazers_count":173,"open_issues_count":35,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-26T21:08:32.607Z","etag":null,"topics":["flake-parts","haskell","nix"],"latest_commit_sha":null,"homepage":"https://community.flake.parts/haskell-flake","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-05-30T13:01:57.000Z","updated_at":"2025-03-23T15:21:36.000Z","dependencies_parsed_at":"2023-11-08T02:42:15.819Z","dependency_job_id":"fd271301-7f4f-4aa7-902c-844d7feeb1b3","html_url":"https://github.com/srid/haskell-flake","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fhaskell-flake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fhaskell-flake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fhaskell-flake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fhaskell-flake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srid","download_url":"https://codeload.github.com/srid/haskell-flake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247156529,"owners_count":20893199,"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":["flake-parts","haskell","nix"],"created_at":"2024-08-02T15:01:04.852Z","updated_at":"2025-04-04T10:04:09.632Z","avatar_url":"https://github.com/srid.png","language":"Nix","funding_links":[],"categories":["Programming Languages","Nix"],"sub_categories":["Haskell"],"readme":"[![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://nixos.zulipchat.com/#narrow/stream/413949-haskell-flake)\n[![Naiveté Compass of Mood](https://img.shields.io/badge/naïve-FF10F0)](https://srid.ca/coc \"This project follows the 'Naiveté Compass of Mood'\")\n\n# haskell-flake - Manage Haskell projects conveniently with Nix\n\n\u003cimg src=\"./doc/haskell-flake.webp\" width=100 /\u003e\n\nThere are [several ways](https://nixos.asia/en/haskell) to manage Haskell packages using [Nix](https://nixos.asia/en/nix) with varying degrees of integration.  `haskell-flake` makes Haskell development, packaging and deployment with Nix flakes a lot [simpler](https://community.flake.parts/haskell-flake/start#under-the-hood) than other existing approaches.  This project is set up as a modern [`flake-parts`](https://flake.parts/) module to integrate easily into other Nix projects and shell development environments in a lightweight and modular way.\n\nTo see more background information, guides and best practices, visit https://community.flake.parts/haskell-flake\n\nCaveat: `haskell-flake` only supports the Haskell package manager [Cabal](https://www.haskell.org/cabal/),\nso your project must have a top-level `.cabal` file (single package project) or a `cabal.project` file\n(multi-package project).\n\n## Getting started\n\nThe minimal changes to your `flake.nix` to introduce the `haskell-flake` and [`flake-parts`](https://flake.parts/) modules will look similar to:\n\n```nix\n# file: flake.nix\n{\n  inputs = {\n    ...\n    flake-parts.url = \"github:hercules-ci/flake-parts\";\n    haskell-flake.url = \"github:srid/haskell-flake\";\n  };\n\n  outputs = inputs:\n    inputs.flake-parts.lib.mkFlake { inherit inputs; } {\n      systems = [ \"x86_64-linux\", ... ];\n      imports = [\n        ...\n        inputs.haskell-flake.flakeModule\n      ];\n      perSystem = { self', system, lib, config, pkgs, ... }: {\n        haskellProjects.default = {\n          # basePackages = pkgs.haskellPackages;\n\n          # Packages to add on top of `basePackages`, e.g. from Hackage\n          packages = {\n            aeson.source = \"1.5.0.0\"; # Hackage version\n          };\n\n          # my-haskell-package development shell configuration\n          devShell = {\n            hlsCheck.enable = false;\n          };\n\n          # What should haskell-flake add to flake outputs?\n          autoWire = [ \"packages\" \"apps\" \"checks\" ]; # Wire all but the devShell\n        };\n\n        devShells.default = pkgs.mkShell {\n          name = \"my-haskell-package custom development shell\";\n          inputsFrom = [\n            ...\n            config.haskellProjects.default.outputs.devShell\n          ];\n          nativeBuildInputs = with pkgs; [\n            # other development tools.\n          ];\n        };\n      };\n    };\n}\n```\n\n`haskell-flake` scans your folder automatically for a `.cabal` or `cabal.project` file.\nIn this example an imaginary `my-haskell-package.cabal` project is used.\n\nTo see in more detail how to use `haskell-flake` in a realistic Haskell project\nwith several other development tools, take a look at\nthe corresponding [Haskell single-package project Nix template](https://github.com/srid/haskell-template) and\nthis [Haskell multi-package project Nix example](https://github.com/srid/haskell-multi-nix).\n\n## Documentation\n\nhttps://community.flake.parts/haskell-flake\n\n## Discussion\n\n[Zulip](https://nixos.zulipchat.com/#narrow/stream/413949-haskell-flake) is the primary venue for discussion; we also have [Github Discussions](https://github.com/srid/haskell-flake/discussions) enabled.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrid%2Fhaskell-flake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrid%2Fhaskell-flake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrid%2Fhaskell-flake/lists"}