mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
templates/local-ruby-nix: update devshell and flake
This commit is contained in:
parent
6dbe0c2c23
commit
55f9db7599
@ -5,8 +5,11 @@
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
ruby-nix.url = "github:sagittaros/ruby-nix";
|
||||
ruby-nix.url = "github: inscapist/ruby-nix";
|
||||
ruby-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
ruby-nix-bundix.url = "github:inscapist/bundix";
|
||||
ruby-nix-bundix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, ruby-nix, nixpkgs, ... }:
|
||||
@ -14,10 +17,24 @@
|
||||
in inputs.flake-utils.lib.eachSystem systems (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
gems = ruby-nix.lib pkgs {
|
||||
name = "ruby-nix-env";
|
||||
ruby = pkgs.ruby_3_1;
|
||||
gemset = ./gemset.nix;
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default =
|
||||
import ./shell.nix { inherit pkgs ruby-nix; };
|
||||
import ./shell.nix {
|
||||
inherit pkgs;
|
||||
extraBuildInputs = [
|
||||
gems.env
|
||||
gems.ruby
|
||||
];
|
||||
extraPackages = [
|
||||
inputs.ruby-nix-bundix.packages."${system}".default
|
||||
];
|
||||
};
|
||||
|
||||
formatter = pkgs.treefmt;
|
||||
});
|
||||
|
@ -1,19 +1,12 @@
|
||||
{ pkgs ? import <nixpkgs> { }, ruby-nix }:
|
||||
{ pkgs ? import <nixpkgs> { }
|
||||
, extraBuildInputs ? [ ]
|
||||
, extraPackages ? [ ]
|
||||
}:
|
||||
|
||||
with pkgs;
|
||||
|
||||
let
|
||||
gems = ruby-nix.lib pkgs {
|
||||
name = "ruby-nix-env";
|
||||
ruby = ruby_3_1;
|
||||
gemset = ./gemset.nix;
|
||||
};
|
||||
in
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
gems.env
|
||||
gems.ruby
|
||||
];
|
||||
buildInputs = extraBuildInputs;
|
||||
|
||||
packages = [
|
||||
# Formatters
|
||||
@ -21,5 +14,5 @@ mkShell {
|
||||
|
||||
# Language servers
|
||||
rnix-lsp
|
||||
];
|
||||
] ++ extraPackages;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user