dev-templates/ruby/flake.nix

26 lines
600 B
Nix
Raw Normal View History

2022-07-31 22:18:29 +02:00
{
2022-08-01 00:00:58 +02:00
description = "A Nix-flake-based Ruby development environment";
2022-07-31 22:18:29 +02:00
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
'';
};
};
});
}