Add Haskell env

This commit is contained in:
Luc Perkins 2022-08-01 00:00:58 +02:00
parent 43df5c9b0b
commit 7d3513701f
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
11 changed files with 105 additions and 7 deletions

View file

@ -32,6 +32,7 @@ Once your preferred template has been initialized, you can use the provided shel
| [Cue] | [`cue`](./cue/) | | [Cue] | [`cue`](./cue/) |
| [Dhall] | [`dhall`](./dhall/) | | [Dhall] | [`dhall`](./dhall/) |
| [Elixir] | [`elixir`](./elixir/) | | [Elixir] | [`elixir`](./elixir/) |
| [Elm] | [`elm`](./elm/) |
| [Gleam] | [`gleam`](./gleam/) | | [Gleam] | [`gleam`](./gleam/) |
| [Go] 1.17 | [`go1_17`](./go1.17/) | | [Go] 1.17 | [`go1_17`](./go1.17/) |
| [Go] 1.18 | [`go1_18`](./go1.18/) | | [Go] 1.18 | [`go1_18`](./go1.18/) |
@ -109,6 +110,11 @@ The sections below list what each template includes. In all cases, you're free t
- [damon] - [damon]
- [Terragrunt] 0.37.0 - [Terragrunt] 0.37.0
### [`haskell`](./haskell/)
- [GHC][haskell] 9.0.2
- [cabal] 3.6.2.0
### [`java`](./java) ### [`java`](./java)
- [Java] 17.0.3 - [Java] 17.0.3
@ -191,6 +197,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[ant]: https://ant.apache.org [ant]: https://ant.apache.org
[buf]: https://github.com/bufbuild/buf [buf]: https://github.com/bufbuild/buf
[cabal]: https://www.haskell.org/cabal
[cachix]: https://www.cachix.org [cachix]: https://www.cachix.org
[cargo]: https://doc.rust-lang.org/cargo [cargo]: https://doc.rust-lang.org/cargo
[cargo-audit]: https://crates.io/crates/cargo-audit [cargo-audit]: https://crates.io/crates/cargo-audit
@ -211,7 +218,8 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[goimports]: https://pkg.go.dev/golang.org/x/tools/cmd/goimports [goimports]: https://pkg.go.dev/golang.org/x/tools/cmd/goimports
[golangci-lint]: https://github.com/golangci/golangci-lint [golangci-lint]: https://github.com/golangci/golangci-lint
[gradle]: https://gradle.org [gradle]: https://gradle.org
[hashicorp]: https://hashicorp.com/ [hashicorp]: https://hashicorp.com
[haskell]: https://haskell.org
[iex]: https://hexdocs.pm/iex/IEx.html [iex]: https://hexdocs.pm/iex/IEx.html
[java]: https://java.com [java]: https://java.com
[kotlin]: https://kotlinlang.org [kotlin]: https://kotlinlang.org

View file

@ -1,5 +1,5 @@
{ {
description = "A Nix-flake-based Dhall development environment"; description = "A Nix-flake-based Cue development environment";
inputs = { dev.url = "github:the-nix-way/dev-templates"; }; inputs = { dev.url = "github:the-nix-way/dev-templates"; };

View file

@ -1,5 +1,5 @@
{ {
description = "A Nix-flake-based Protobuf development environment"; description = "A Nix-flake-based Elm development environment";
inputs = { dev.url = "github:the-nix-way/dev-templates"; }; inputs = { dev.url = "github:the-nix-way/dev-templates"; };

View file

@ -50,6 +50,11 @@
description = "HashiCorp DevOps tools development environment"; description = "HashiCorp DevOps tools development environment";
}; };
haskell = {
path = ./haskell;
description = "Haskell development environment";
};
java = { java = {
path = ./java; path = ./java;
description = "Java development environment"; description = "Java development environment";

1
haskell/.envrc Normal file
View file

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

60
haskell/flake.lock Normal file
View file

@ -0,0 +1,60 @@
{
"nodes": {
"dev": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659301425,
"narHash": "sha256-ws9jVuS3XKx5nYITvSGnMDj8y+JLu7W4ZLWgSoaWDG0=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "34bf508a971639577be4ac3fc422897d380c5086",
"type": "github"
},
"original": {
"owner": "the-nix-way",
"repo": "dev-templates",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1659300577,
"narHash": "sha256-mTlKMvvBJ4W32Y9VdEXATyMDUWEYVO4P9IWo8Mzn3rM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b91029be03d836b5ab33042aaf0167f02221c1ac",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"dev": "dev"
}
}
},
"root": "root",
"version": 7
}

24
haskell/flake.nix Normal file
View file

@ -0,0 +1,24 @@
{
description = "A Nix-flake-based Haskell development environment";
inputs = { dev.url = "github:the-nix-way/dev-templates"; };
outputs = { self, dev }:
let inherit (dev.lib) flake-utils nixpkgs;
in flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
inherit (pkgs) cabal-install ghc mkShell;
in {
devShells = {
default = mkShell {
buildInputs = [ cabal-install ghc ];
shellHook = ''
${ghc}/bin/ghc --version
${cabal-install}/bin/cabal --version
'';
};
};
});
}

View file

@ -1,5 +1,5 @@
{ {
description = "A Nix-flake-based Protobuf development environment"; description = "A Nix-flake-based Nim development environment";
inputs = { dev.url = "github:the-nix-way/dev-templates"; }; inputs = { dev.url = "github:the-nix-way/dev-templates"; };

View file

@ -1,5 +1,5 @@
{ {
description = "A Nix-flake-based Protobuf development environment"; description = "A Nix-flake-based Open Policy Agent development environment";
inputs = { dev.url = "github:the-nix-way/dev-templates"; }; inputs = { dev.url = "github:the-nix-way/dev-templates"; };

View file

@ -1,5 +1,5 @@
{ {
description = "A Nix-flake-based Protobuf development environment"; description = "A Nix-flake-based Python development environment";
inputs = { inputs = {
dev.url = "github:the-nix-way/dev-templates"; dev.url = "github:the-nix-way/dev-templates";

View file

@ -1,5 +1,5 @@
{ {
description = "A Nix-flake-based Protobuf development environment"; description = "A Nix-flake-based Ruby development environment";
inputs = { dev.url = "github:the-nix-way/dev-templates"; }; inputs = { dev.url = "github:the-nix-way/dev-templates"; };