mirror of
https://github.com/foo-dogsquared/asciidoctor-foodogsquared-extensions.git
synced 2025-01-30 22:57:56 +00:00
Use ruby-nix for development environment
This commit is contained in:
parent
5d651a95a3
commit
ed3bb6d1a3
23
flake.lock
generated
23
flake.lock
generated
@ -37,7 +37,28 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"ruby-nix": "ruby-nix"
|
||||
}
|
||||
},
|
||||
"ruby-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681695382,
|
||||
"narHash": "sha256-RBZnSdx3dnUg3o+FiQVKKeKZN6pntYb19mXnnA5b/i8=",
|
||||
"owner": "sagittaros",
|
||||
"repo": "ruby-nix",
|
||||
"rev": "b1edcbec13c9f15915a900b1fb87d9c3ef1e882b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sagittaros",
|
||||
"repo": "ruby-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -4,9 +4,12 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
ruby-nix.url = "github:sagittaros/ruby-nix";
|
||||
ruby-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }:
|
||||
outputs = inputs@{ self, ruby-nix, nixpkgs, ... }:
|
||||
let systems = inputs.flake-utils.lib.defaultSystems;
|
||||
in inputs.flake-utils.lib.eachSystem systems (system:
|
||||
let
|
||||
@ -14,7 +17,7 @@
|
||||
in
|
||||
{
|
||||
devShells.default =
|
||||
import ./shell.nix { inherit pkgs; };
|
||||
import ./shell.nix { inherit pkgs ruby-nix; };
|
||||
|
||||
formatter = pkgs.treefmt;
|
||||
});
|
||||
|
14
shell.nix
14
shell.nix
@ -1,17 +1,21 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
{ pkgs ? import <nixpkgs> { }, ruby-nix }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
let
|
||||
gems = bundlerEnv {
|
||||
gems = ruby-nix.lib pkgs {
|
||||
name = "asciidoctor-foodogsquared-extensions";
|
||||
gemdir = ./.;
|
||||
ruby = ruby_3_1;
|
||||
gemset = ./gemset.nix;
|
||||
};
|
||||
in
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
gems.env
|
||||
gems.ruby
|
||||
];
|
||||
|
||||
packages = [
|
||||
gems
|
||||
gems.wrappedRuby
|
||||
bundix
|
||||
|
||||
# Formatters
|
||||
|
Loading…
Reference in New Issue
Block a user