Update flake and devshell

This commit is contained in:
Gabriel Arazas 2023-11-17 22:11:13 +08:00
parent 83aad53d74
commit 66233f04e6
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 13 additions and 11 deletions

View File

@ -17,11 +17,20 @@
in inputs.flake-utils.lib.eachSystem systems (system: in inputs.flake-utils.lib.eachSystem systems (system:
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
gems = ruby-nix.lib pkgs {
name = "asciidoctor-foodogsquared-extensions";
ruby = pkgs.ruby_3_1;
gemset = ./gemset.nix;
};
in in
{ {
devShells.default = devShells.default =
import ./shell.nix { import ./shell.nix {
inherit pkgs ruby-nix; inherit pkgs;
extraBuildInputs = [
gems.env
gems.ruby
];
extraPackages = [ extraPackages = [
inputs.ruby-nix-bundix.packages."${system}".default inputs.ruby-nix-bundix.packages."${system}".default
]; ];

View File

@ -1,25 +1,18 @@
{ pkgs ? import <nixpkgs> { } { pkgs ? import <nixpkgs> { }
, ruby-nix
, extraPackages ? [ ] , extraPackages ? [ ]
, extraBuildInputs ? [ ] , extraBuildInputs ? [ ]
}: }:
with pkgs; with pkgs;
let
gems = ruby-nix.lib pkgs {
name = "asciidoctor-foodogsquared-extensions";
ruby = ruby_3_1;
gemset = ./gemset.nix;
};
in
mkShell { mkShell {
buildInputs = [ buildInputs = [
gems.env # Dependencies for Nokogiri.
gems.ruby
pkg-config pkg-config
zlib zlib
libiconv libiconv
# Dependencies for rugged.
libgit2 libgit2
] ++ extraBuildInputs; ] ++ extraBuildInputs;