From 83aad53d740da3eba098db449ccd2486355ae48b Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 17 Nov 2023 22:02:56 +0800 Subject: [PATCH] Add forked bundix to the devshell Just to make it easier to set up for next time. --- flake.lock | 27 ++++++++++++++++++++++++--- flake.nix | 12 ++++++++++-- shell.nix | 16 +++++++++++----- 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 8432233..02ee245 100644 --- a/flake.lock +++ b/flake.lock @@ -38,7 +38,8 @@ "inputs": { "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", - "ruby-nix": "ruby-nix" + "ruby-nix": "ruby-nix", + "ruby-nix-bundix": "ruby-nix-bundix" } }, "ruby-nix": { @@ -50,17 +51,37 @@ "locked": { "lastModified": 1688825976, "narHash": "sha256-7EvZu+/+uNZ0kfSgQQIrRGg8RXcUN9UgRsobjbxEdBQ=", - "owner": "sagittaros", + "owner": "inscapist", "repo": "ruby-nix", "rev": "911d5e8584453e1aff0fb85c93aa163dcdd0f3f0", "type": "github" }, "original": { - "owner": "sagittaros", + "owner": "inscapist", "repo": "ruby-nix", "type": "github" } }, + "ruby-nix-bundix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688825865, + "narHash": "sha256-7HP6amLkY3u2NvPguanIW/gugUvGsmY5OMY6tKpjMrA=", + "owner": "inscapist", + "repo": "bundix", + "rev": "5cb01869cb09fb367c02527b1f66707fb9277076", + "type": "github" + }, + "original": { + "owner": "inscapist", + "repo": "bundix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index baad1bb..1ec58bb 100644 --- a/flake.nix +++ b/flake.nix @@ -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, ... }: @@ -17,7 +20,12 @@ in { devShells.default = - import ./shell.nix { inherit pkgs ruby-nix; }; + import ./shell.nix { + inherit pkgs ruby-nix; + extraPackages = [ + inputs.ruby-nix-bundix.packages."${system}".default + ]; + }; formatter = pkgs.treefmt; }); diff --git a/shell.nix b/shell.nix index 406228a..baf6927 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,8 @@ -{ pkgs ? import { }, ruby-nix }: +{ pkgs ? import { } +, ruby-nix +, extraPackages ? [ ] +, extraBuildInputs ? [ ] +}: with pkgs; @@ -13,15 +17,17 @@ mkShell { buildInputs = [ gems.env gems.ruby - ]; + pkg-config + zlib + libiconv + libgit2 + ] ++ extraBuildInputs; packages = [ - bundix - # Formatters nixpkgs-fmt # Language servers rnix-lsp - ]; + ] ++ extraPackages; }