{"id":31847935,"url":"https://github.com/wireapp/ghc-flakr","last_synced_at":"2026-05-19T14:05:42.440Z","repository":{"id":207003100,"uuid":"718186542","full_name":"wireapp/ghc-flakr","owner":"wireapp","description":"Run Haskell scripts. NOW.","archived":false,"fork":false,"pushed_at":"2024-05-28T08:31:49.000Z","size":28,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-05-28T14:39:54.316Z","etag":null,"topics":["haskell","nix"],"latest_commit_sha":null,"homepage":"","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/wireapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-11-13T15:04:26.000Z","updated_at":"2024-05-28T08:31:53.000Z","dependencies_parsed_at":"2024-05-28T09:12:12.358Z","dependency_job_id":null,"html_url":"https://github.com/wireapp/ghc-flakr","commit_stats":null,"previous_names":["wireapp/ghc-flakr"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wireapp/ghc-flakr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fghc-flakr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fghc-flakr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fghc-flakr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fghc-flakr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wireapp","download_url":"https://codeload.github.com/wireapp/ghc-flakr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireapp%2Fghc-flakr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010951,"owners_count":26084841,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["haskell","nix"],"created_at":"2025-10-12T09:58:38.444Z","updated_at":"2025-10-12T09:58:43.682Z","avatar_url":"https://github.com/wireapp.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/wireapp/ghc-flakr/actions/workflows/test-flake.yml/badge.svg\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/built%20with-nix-5277C3?logo=nixos\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e GHC flakr - Run Haskell scripts. NOW. \u003c/h1\u003e\n\n## Using for running\n\n*requirements:*\n- a `nix` installation with `nix-commmand` and `flakes` experimental features enabled\n- a `Haskell` file with a `main :: IO` function in it\n\n*usage:*\n- if your file is called `main.hs`: `nix run github:wireapp/ghc-flakr`\n- if your file is called `anything-else.hs`: `nix run github:wireapp/ghc-flakr# anything-else.hs`\n\n## Using with shebangs\n\n*requirements*:\n- a `nix` installation with `nix-commmand` and `flakes` experimental features enabled\n- your `/usr/bin/env` understands the `-S, --split-string=S` parameter (should be the case if your Linux was updated in the recent 5 years)\n\n*usage:*\n- create a file, `./main.hs`, as such:\n  ```haskell\n  #!/usr/bin/env -S nix run github:wireapp/ghc-flakr\n\n  main = do\n    putStrLn \"Hello flakr user\"\n  ```\n- ```bash\n  chmod +x ./main.hs\n  ```\n- `./main.hs` should print `Hello flakr user`\n\n## Using it to create a devShell\n\n\u003e **NOTE**\n\u003e This mainly useful if you want to include different deps\n\n*requirements*\n- a `nix` installation with `nix-commmand` and `flakes` experimental features enabled\n\n*nice-to-haves:*\n- a `direnv` installation with `nix-direnv` support\n\n*usage:*\n- run\n  ```bash\n  nix flake init -t github:wireapp/ghc-flakr`\n  ```\n- edit `flake.nix` to your liking, for more information, refer to\n  - [the flake parts docs](https://flake.parts/)\n  - [the devshell docs](https://flake.parts/options/devshell) ([upstream repository](https://github.com/numtide/devshell))\n  - [the pre-commit-hooks.nix docs](https://flake.parts/options/pre-commit-hooks-nix) ([upstream repository](https://github.com/cachix/pre-commit-hooks.nix))\n- run\n  ```bash\n  direnv allow\n  ```\n  or\n  ```bash\n  nix develop\n  ```\n  `devshell` will tell you about available commands (use `menu` to be reminded)\n\n## Installing globally\n\n*requirements*\n- a `nix` installation with `nix-commmand` and `flakes` experimental features enabled\n\n*usage:*\n- to install:\n  ```bash\n  nix profile install github:wireapp/ghc-flakr\n  ```\n- to remove:\n  ```bash\n  nix profile remove ghc-flakr\n  ```\n- to use: this flake provides a single executable, `hs-run` that works as with `nix run` (see above)\n\n## Some resources on using Haskell as a scripting language\n\n### (Incomplete list of, maybe) Useful packages\n\n- [turtle@hackage](https://flora.pm/packages/@hackage/turtle)\n- [shelly@hackage](https://flora.pm/packages/@hackage/shelly)\n- [procex@hackage](https://flora.pm/packages/@hackage/procex)\n- [shh@hackage](https://flora.pm/packages/@hackage/shh)\n- [foldl@hackage](https://flora.pm/packages/@hackage/foldl)\n- [streamly-process@hackage](https://flora.pm/packages/@hackage/streamly-process)\n- [streaming-process@hackage](https://flora.pm/packages/@hackage/streaming-process)\n- [cradle (blog post)](https://garnix.io/blog/announcing-cradle)\n\n### Relevant blog-posts\n\n- [Las about using GHCi as his shell](https://las.rs/blog/haskell-as-shell.html)\n- [Gabriella about using Haskell for shell scripting](https://www.haskellforall.com/2015/01/use-haskell-for-shell-scripting.html)\n\n## Caching\n\n- there's a cachix available at https://ghc-flakr.cachix.org\n- to use it, run\n  ```bash\n  cachix use ghc-flakr\n  ```\n  or add the appropriate settings in your `trusted-subsituters`, the public key is\n  ```\n  ghc-flakr.cachix.org-1:y2jnE5kv6OksYl+ZPis1pmWHCSa8el+FVCjcQI5LKx0=\n  ```\n\n## Contributing\n\nThis is mainly supposed to be a way to allow the wire backend team to easily write scripts in Haskell, so there's two possibilies:\n- if you're a wire backend engineer and want to add dependencies to the shell that you think will be useful, ***please do so***\n- if you're from outside of wire, please only open a PR if the change is unspecific to the used tooling, for everything else, please\n  maintain your own fork.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwireapp%2Fghc-flakr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwireapp%2Fghc-flakr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwireapp%2Fghc-flakr/lists"}