add purescript

This commit is contained in:
jtomas 2022-12-21 16:04:57 +01:00
parent b39ce859b4
commit 28812f5ae4
5 changed files with 142 additions and 24 deletions

View file

@ -28,7 +28,7 @@ Once your preferred template has been initialized, you can use the provided shel
## Available templates ## Available templates
| Language/framework/tool | Template | | Language/framework/tool | Template |
| :----------------------- | :------------------------ | | :----------------------- | :-----------------------------|
| [Clojure] | [`clojure`](./clojure/) | | [Clojure] | [`clojure`](./clojure/) |
| [Cue] | [`cue`](./cue/) | | [Cue] | [`cue`](./cue/) |
| [Dhall] | [`dhall`](./dhall/) | | [Dhall] | [`dhall`](./dhall/) |
@ -47,6 +47,7 @@ Once your preferred template has been initialized, you can use the provided shel
| [Open Policy Agent][opa] | [`opa`](./opa) | | [Open Policy Agent][opa] | [`opa`](./opa) |
| [PHP] | [`php`](./php/) | | [PHP] | [`php`](./php/) |
| [Protobuf] | [`protobuf`](./protobuf/) | | [Protobuf] | [`protobuf`](./protobuf/) |
| [Purescript] | [`purescript`](./purescript/) |
| [Ruby] | [`ruby`](./ruby/) | | [Ruby] | [`ruby`](./ruby/) |
| [Rust] | [`rust`](./rust/) | | [Rust] | [`rust`](./rust/) |
| [Scala] | [`scala`](./scala/) | | [Scala] | [`scala`](./scala/) |
@ -181,6 +182,13 @@ The sections below list what each template includes. In all cases, you're free t
- The [Buf CLI][buf] 1.7.0 - The [Buf CLI][buf] 1.7.0
- [protoc][protobuf] 3.19.4 - [protoc][protobuf] 3.19.4
### [`purescript`](./purescript/)
- [Purescript]
- [Spago]
- [purescript-language-server]
- [purs-tidy]
### [`python`](./python/) ### [`python`](./python/)
- [Python] 3.11.0rc1 - [Python] 3.11.0rc1
@ -294,6 +302,9 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[php]: https://php.net/ [php]: https://php.net/
[pnpm]: https://pnpm.io [pnpm]: https://pnpm.io
[protobuf]: https://developers.google.com/protocol-buffers [protobuf]: https://developers.google.com/protocol-buffers
[Purescript]: https://github.com/purescript/purescript
[purescript-language-server]: https://github.com/nwolverson/purescript-language-server
[purs-tidy]: https://github.com/natefaubion/purescript-tidy
[python]: https://python.org [python]: https://python.org
[ruby]: https://ruby-lang.org [ruby]: https://ruby-lang.org
[rust]: https://rust-lang.org [rust]: https://rust-lang.org
@ -301,6 +312,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[scala]: https://scala-lang.org [scala]: https://scala-lang.org
[statix]: https://github.com/nerdypepper/statix [statix]: https://github.com/nerdypepper/statix
[sbt]: https://www.scala-sbt.org [sbt]: https://www.scala-sbt.org
[Spago]: https://github.com/purescript/spago
[terraform]: https://terraform.io [terraform]: https://terraform.io
[terragrunt]: https://terragrunt.gruntwork.io [terragrunt]: https://terragrunt.gruntwork.io
[tflint]: https://github.com/terraform-linters/tflint [tflint]: https://github.com/terraform-linters/tflint

View file

@ -100,6 +100,11 @@
description = "Protobuf development environment"; description = "Protobuf development environment";
}; };
purescript = {
path = ./purescript;
description = "Purescript development environment";
};
python = { python = {
path = ./python; path = ./python;
description = "Python development environment"; description = "Python development environment";

1
purescript/.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

59
purescript/flake.lock Normal file
View file

@ -0,0 +1,59 @@
{
"nodes": {
"easy-purescript-nix": {
"flake": false,
"locked": {
"lastModified": 1671011575,
"narHash": "sha256-tESal32bcqqdZO+aKnBzc1GoL2mtnaDtj2y7ociCRGA=",
"owner": "justinwoo",
"repo": "easy-purescript-nix",
"rev": "11d3bd58ce6e32703bf69cec04dc7c38eabe14ba",
"type": "github"
},
"original": {
"owner": "justinwoo",
"repo": "easy-purescript-nix",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1671632759,
"narHash": "sha256-xWpURFJXayfhGImTH8tPgf4hkGTCt0LTFvhKuKPmhvU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9f684b1517a9dc1a456134a26493df7874027dd9",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"easy-purescript-nix": "easy-purescript-nix",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

41
purescript/flake.nix Normal file
View file

@ -0,0 +1,41 @@
{
description = "A Nix-flake-based Purescript development environment";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs";
easy-purescript-nix = {
url = "github:justinwoo/easy-purescript-nix";
flake = false;
};
};
outputs =
{ self
, nixpkgs
, flake-utils
, easy-purescript-nix
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
easy-ps = import easy-purescript-nix { inherit pkgs; };
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
easy-ps.purs
easy-ps.spago
easy-ps.purescript-language-server
easy-ps.purs-tidy
pkgs.nodejs
];
shellHook = ''
echo "Purs `${easy-ps.purs}/bin/purs --version`"
echo "Spago `${easy-ps.spago}/bin/spago --version`"
echo "Purescript Language Server `${easy-ps.purescript-language-server}/bin/purescript-language-server --version`"
echo "Purs Tidy `${easy-ps.purs-tidy}/bin/purs-tidy --version`"
echo "Node.js `${pkgs.nodejs}/bin/node --version`"
'';
};
});
}