diff --git a/README.md b/README.md index 16de6d4..43180d6 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Once your preferred template has been initialized, you can use the provided shel | Language/framework/tool | Template | | :----------------------- | :------------------------ | +| [Cue] | [`cue`](./cue/) | | [Dhall] | [`dhall`](./dhall/) | | [Elixir] | [`elixir`](./elixir/) | | [Gleam] | [`gleam`](./gleam/) | @@ -37,10 +38,12 @@ Once your preferred template has been initialized, you can use the provided shel | [Hashicorp] tools | [`hashi`](./hashi/) | | [Java] | [`java`](./java/) | | [Kotlin] | [`kotlin`](./kotlin/) | +| [Nim] | [`nim`](./nim/) | | [Nix] | [`nix`](./nix/) | | [Node.js][node] | [`node`](./node/) | | [Open Policy Agent][opa] | [`opa`](./opa) | | [Protobuf] | [`protobuf`](./protobuf/) | +| [Ruby] | [`ruby`](./ruby/) | | [Rust] | [`rust`](./rust/) | | [Scala] | [`scala`](./scala/) | | [Zig] | [`zig`](./zig/) | @@ -149,6 +152,10 @@ The sections below list what each template includes. In all cases, you're free t - The [Buf CLI][buf] 1.7.0 - [protoc][protobuf] 3.19.4 +### [`ruby`](./ruby/) + +- [Ruby] 3.1.2p20, plus the standard Ruby tools (`bundle`, `gem`, etc.) + ### [`rust`](./rust/) - [Rust], including [cargo], [Clippy], and the other standard tools. The Rust version is determined as follows, in order: @@ -216,6 +223,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [phoenix]: https://phoenixframework.org [pnpm]: https://pnpm.io [protobuf]: https://developers.google.com/protocol-buffers +[ruby]: https://ruby-lang.org [rust]: https://rust-lang.org [scala]: https://scala-lang.org [statix]: https://github.com/nerdypepper/statix diff --git a/flake.nix b/flake.nix index 2c0b2ee..f0144f5 100644 --- a/flake.nix +++ b/flake.nix @@ -130,6 +130,11 @@ description = "Protobuf development environment"; }; + ruby = { + path = ./ruby; + description = "Ruby development environment"; + }; + rust = { path = ./rust; description = "Rust development environment"; diff --git a/ruby/.envrc b/ruby/.envrc new file mode 100644 index 0000000..a5dbbcb --- /dev/null +++ b/ruby/.envrc @@ -0,0 +1 @@ +use flake . diff --git a/ruby/flake.lock b/ruby/flake.lock new file mode 100644 index 0000000..7041ed3 --- /dev/null +++ b/ruby/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "dev": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1659297620, + "narHash": "sha256-Uvb9YfBbnF4j+yA2y2EPWZapEdMwORPtsWFj3XpNYko=", + "owner": "the-nix-way", + "repo": "dev-templates", + "rev": "677e040123767876901e808ed6fb515b024558f5", + "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": 1659295566, + "narHash": "sha256-ICqvf+Y782V3G2XHe6m43dBkTzv0Y1DPgXcffoNqa2Q=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "33ab71dafbaa6674243830e29b11e8b674f49a70", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "dev": "dev" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/ruby/flake.nix b/ruby/flake.nix new file mode 100644 index 0000000..a76e166 --- /dev/null +++ b/ruby/flake.nix @@ -0,0 +1,25 @@ +{ + description = "A Nix-flake-based Protobuf 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) mkShell; + + ruby = pkgs.ruby_3_1; + in { + devShells = { + default = mkShell { + buildInputs = [ ruby ]; + + shellHook = '' + ${ruby}/bin/ruby --version + ''; + }; + }; + }); +}