{"id":13682202,"url":"https://github.com/justinwoo/easy-purescript-nix","last_synced_at":"2025-04-07T05:10:35.604Z","repository":{"id":34059357,"uuid":"154022013","full_name":"justinwoo/easy-purescript-nix","owner":"justinwoo","description":"Easy PureScript (and other tools) with Nix","archived":false,"fork":false,"pushed_at":"2024-03-11T12:52:49.000Z","size":366,"stargazers_count":198,"open_issues_count":7,"forks_count":56,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T21:09:54.134Z","etag":null,"topics":["nix","purescript"],"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/justinwoo.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},"funding":{"github":"justinwoo"}},"created_at":"2018-10-21T15:16:08.000Z","updated_at":"2025-01-21T18:01:09.000Z","dependencies_parsed_at":"2024-08-02T13:21:49.778Z","dependency_job_id":"c919309d-69d7-462f-8cd1-6ce089b0d1aa","html_url":"https://github.com/justinwoo/easy-purescript-nix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Feasy-purescript-nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Feasy-purescript-nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Feasy-purescript-nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Feasy-purescript-nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinwoo","download_url":"https://codeload.github.com/justinwoo/easy-purescript-nix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"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-08-02T13:01:42.127Z","updated_at":"2025-04-07T05:10:35.582Z","avatar_url":"https://github.com/justinwoo.png","language":"Nix","funding_links":["https://github.com/sponsors/justinwoo"],"categories":["Nix","Programming Languages"],"sub_categories":["PureScript"],"readme":"# Easy PureScript Nix\n\nA project for using PureScript and related tooling easily with Nix. Note that the `purescript` derivation used in nixpkgs is a derivative of the derivation from this project. See `default.nix` for more information on available versions.\n\n## Example usage\n\nSee [ci.nix](./ci.nix) in this repo for a Nix expression example to be used with `nix-shell`.\n\n```console\n$ nix-shell ./ci.nix\n```\n\nOr simply clone this repo, `cd` into it, and type `nix-shell` (which implicitly calls [`shell.nix`](./shell.nix)).\n\n## Potential questions\n\n### How do I use this? (How do I use derivations in Nix?)\n\nI have written about how to use parts of Nix here: \u003chttps://github.com/justinwoo/nix-shorts\u003e\n\n### How do I install to my system from here?\n\nBehold:\n\n```console\n$ nix-env -f default.nix -iA purs\n  # or nix-env -if purs.nix\n\n$ which purs\n/home/justin/.nix-profile/bin/purs\n$ purs --version\n0.14.4\n```\n\nOr by `shell.nix`:\n\n```nix\n{ pkgs ? import \u003cnixpkgs\u003e { } }:\nlet\n  easy-ps = import\n    (pkgs.fetchFromGitHub {\n      owner = \"justinwoo\";\n      repo = \"easy-purescript-nix\";\n      rev = \"5716cd791c999b3246b4fe173276b42c50afdd8d\";\n      sha256 = \"1r9lx4xhr42znmwb2x2pzah920klbjbjcivp2f0pnka7djvd2adq\";\n    }) {\n    inherit pkgs;\n  };\nin\npkgs.mkShell {\n  buildInputs = [\n    easy-ps.purs-0_14_4\n    easy-ps.psc-package\n  ];\n}\n```\n\n## Nix Flakes\n\nThere is a `flake.nix`. To see what the `flake.nix` provides,\n\n```\nnix flake show github:justinwoo/easy-purescript-nix\n```\n\nYou might need the flag `--allow-import-from-derivation` if you’re on an older version of Nix.\n\n### Deluxe `nix develop` shell\n\nTo get a deluxe PureScript development shell which includes the latest\nversions of everything,\n\n```\nnix develop github:justinwoo/easy-purescript-nix#deluxe\n```\n\n### Custom `nix develop` shell\n\nCreate a custom `nix develop` shell with a `flake.nix` like this for example:\n\n```nix\n{\n  inputs = {\n    nixpkgs.url = \"github:NixOS/nixpkgs/nixos-23.05\";\n    flake-utils.url = \"github:numtide/flake-utils\";\n    easy-purescript-nix.url = \"github:justinwoo/easy-purescript-nix\";\n  };\n\n  outputs = { nixpkgs, flake-utils, easy-purescript-nix, ... }:\n    flake-utils.lib.eachDefaultSystem (system:\n      let\n        pkgs = nixpkgs.legacyPackages.${system};\n        easy-ps = easy-purescript-nix.packages.${system};\n      in\n      {\n        devShells = {\n          default = pkgs.mkShell {\n            name = \"purescript-custom-shell\";\n            buildInputs = [\n              easy-ps.purs-0_15_8\n              easy-ps.spago\n              easy-ps.purescript-language-server\n              easy-ps.purs-tidy\n              pkgs.nodejs-18_x\n              pkgs.esbuild\n            ];\n            shellHook = ''\n              source \u003c(spago --bash-completion-script `which spago`)\n              source \u003c(node --completion-bash)\n              '';\n          };\n       };\n     }\n  );\n}\n```\n\n\n## Why was this made?\n\nSee the blog post about this here: \u003chttps://github.com/justinwoo/my-blog-posts/blob/master/posts/2018-10-24-using-purescript-easily-with-nix.md\u003e\n\nRaison d'etre: \u003chttps://github.com/justinwoo/my-blog-posts/blob/master/posts/2019-04-29-why-easy-purescript-nix.md\u003e\n\n## Credits\n\nThanks to Pekka (@kaitanie) for making this work on NixOS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Feasy-purescript-nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinwoo%2Feasy-purescript-nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Feasy-purescript-nix/lists"}