{"id":16592511,"url":"https://github.com/thomashoneyman/purescript-overlay","last_synced_at":"2025-03-21T13:31:32.349Z","repository":{"id":170709853,"uuid":"646626156","full_name":"thomashoneyman/purescript-overlay","owner":"thomashoneyman","description":"PureScript core tools in Nix","archived":false,"fork":false,"pushed_at":"2025-02-17T12:36:31.000Z","size":359,"stargazers_count":48,"open_issues_count":5,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-19T16:11:08.370Z","etag":null,"topics":["nix","purescript"],"latest_commit_sha":null,"homepage":"","language":"PureScript","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/thomashoneyman.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-05-29T01:10:58.000Z","updated_at":"2025-03-14T10:19:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"efd3fb81-ac91-42d7-b5da-ab149694d6db","html_url":"https://github.com/thomashoneyman/purescript-overlay","commit_stats":null,"previous_names":["thomashoneyman/purescript-nix","thomashoneyman/purix","thomashoneyman/purescript-overlay"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashoneyman%2Fpurescript-overlay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashoneyman%2Fpurescript-overlay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashoneyman%2Fpurescript-overlay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashoneyman%2Fpurescript-overlay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomashoneyman","download_url":"https://codeload.github.com/thomashoneyman/purescript-overlay/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244806104,"owners_count":20513381,"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":["nix","purescript"],"created_at":"2024-10-11T23:21:10.520Z","updated_at":"2025-03-21T13:31:32.327Z","avatar_url":"https://github.com/thomashoneyman.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PureScript Overlay\n\n[![daily-update](https://github.com/thomashoneyman/purescript-nix/actions/workflows/daily-update.yaml/badge.svg)](https://github.com/thomashoneyman/purescript-nix/actions/workflows/daily-update.yaml)\n[![darwin-support](https://github.com/thomashoneyman/purescript-nix/actions/workflows/darwin-support.yaml/badge.svg)](https://github.com/thomashoneyman/purescript-nix/actions/workflows/darwin-support.yaml)\n[![nix-unit-tests](https://github.com/thomashoneyman/purescript-nix/actions/workflows/nix-unit-tests.yaml/badge.svg)](https://github.com/thomashoneyman/purescript-nix/actions/workflows/nix-unit-tests.yaml)\n\nPure and reproducible overlay for the standard PureScript toolchain, including support for Nix flakes. The toolchain is auto-updated every day. Currently supported tools:\n\n- `purs`, the compiler\n- `spago`, the package manager\n- `purs-tidy`, the code formatter\n- `purs-backend-es`, the optimizer\n- `purescript-language-server`, the language server protocol\n\n\u003e :warning: This library is unstable and may be reorganized. Use at your own risk!\n\nThe overlay is tested on the following architectures:\n\n- x86_64-linux\n- x86_64-darwin (Intel Mac)\n- aarch64-darwin (M1 Mac)\n- aarch64-linux\n\nThe included overlay inserts the latest stable and unstable executables into your packages (ie. `purs`, `purs-unstable`, and so on). You can see all specific versions in the [named.json](./manifests/named.json) file. It also provides many versions of each executable under a `-bin` namespace (ie. `purs-bin`, `spago-bin`, and so on) so you can access specific versions of a tool. For example, you can use `purs-bin.purs-0_15_8` to get the 0.15.8 PureScript compiler. These are tracked in the [manifests](./manifests/) directory.\n\nIf you're looking for a way to *build* your `spago@next`-based projects using Nix, take a look at https://github.com/jeslie0/mkSpagoDerivation.\n\n## Usage\n\nIn a Nix flake, use the provided overlay when importing nixpkgs to get access to tools like `purs` and `spago` and functions like `buildSpagoLock`. For example, the below flake creates a development shell with recent versions of the PureScript compiler and Spago package manager:\n\n```nix\n{\n  inputs = {\n    nixpkgs.url = \"github:NixOS/nixpkgs/nixos-23.05\";\n    purescript-overlay = {\n      url = \"github:thomashoneyman/purescript-overlay\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n  };\n\n  outputs = { self, nixpkgs, ... }@inputs:\n    let\n      supportedSystems = [\"x86_64-linux\" \"aarch64-linux\" \"x86_64-darwin\" \"aarch64-darwin\"];\n\n      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;\n\n      nixpkgsFor = forAllSystems (system: import nixpkgs {\n        inherit system;\n        config = { };\n        overlays = builtins.attrValues self.overlays;\n      });\n    in {\n      overlays = {\n        purescript = inputs.purescript-overlay.overlays.default;\n      };\n\n      packages = forAllSystems (system:\n        let pkgs = nixpkgsFor.${system}; in {\n          default = pkgs.hello; # your package here\n        });\n\n      devShells = forAllSystems (system:\n        # pkgs now has access to the standard PureScript toolchain\n        let pkgs = nixpkgsFor.${system}; in {\n          default = pkgs.mkShell {\n            name = \"my-purescript-project\";\n            inputsFrom = builtins.attrValues self.packages.${system};\n            buildInputs = with pkgs; [\n              purs\n              spago-unstable\n              purs-tidy-bin.purs-tidy-0_10_0\n              purs-backend-es\n            ];\n          };\n        });\n  };\n}\n```\n\nThe latest versions of all the supported tools are including in the default development shell of this flake. To enter a `nix develop` shell environment with all of the supported tools:\n\n```console\nnix develop github:thomashoneyman/purescript-overlay\n```\n\nYou can also run individual packages from the flake, e.g. to format your `src` directory:\n\n```console\nnix run github:thomashoneyman/purescript-overlay#purs-tidy format-in-place src\n```\n\nYou can run a `nix shell` with `purs` and `spago-unstable` selected from this flake:\n\n```console\nnix shell github:thomashoneyman/purescript-overlay#purs github:thomashoneyman/purescript-overlay#spago-unstable\n```\n\n## Tests\n\nYou can run the repository tests using a combination of `nix eval .#lib` (to run the unit tests in Nix) and `nix flake check` (to run the derivation-based tests). Both are executed in CI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomashoneyman%2Fpurescript-overlay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomashoneyman%2Fpurescript-overlay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomashoneyman%2Fpurescript-overlay/lists"}