From 100cb299ccbddc0e1a320c960a1cab569327e7c6 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sat, 8 Apr 2023 22:32:26 +0800 Subject: [PATCH] project: use ruby-nix --- flake.nix | 10 ++++++++-- shell.nix | 14 ++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index e272e59..3a3ce0a 100644 --- a/flake.nix +++ b/flake.nix @@ -4,12 +4,18 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; + ruby-nix.url = "github:sagittaros/ruby-nix"; }; outputs = inputs@{ self, nixpkgs, ... }: let systems = inputs.flake-utils.lib.defaultSystems; in inputs.flake-utils.lib.eachSystem systems (system: { - devShells.default = - import ./shell.nix { pkgs = import nixpkgs { inherit system; }; }; + devShells.default = let + pkgs = import nixpkgs { inherit system; }; + in + import ./shell.nix { + inherit pkgs; + ruby-nix = inputs.ruby-nix.lib pkgs; + }; }); } diff --git a/shell.nix b/shell.nix index 9663c2b..8716b96 100644 --- a/shell.nix +++ b/shell.nix @@ -1,18 +1,20 @@ -{ pkgs ? import { } }: +{ pkgs ? import { }, ruby-nix }: with pkgs; let - gems = bundlerEnv { + localGems = ruby-nix { name = "hugo-website-gems"; - gemdir = ./.; + gemset = ./gemset.nix; }; in mkShell { - packages = [ - gems - gems.wrappedRuby + buildInputs = [ + localGems.env + localGems.ruby + ]; + packages = [ git go hugo