diff --git a/Gemfile b/Gemfile index e227b00..1f5d010 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' gem 'asciidoctor' gem 'asciidoctor-bibtex' gem 'asciidoctor-diagram' -gem 'asciidoctor-foodogsquared-extensions', path: './gems' +gem 'asciidoctor-foodogsquared-extensions' gem 'concurrent-ruby' gem 'open-uri-cached' gem 'rouge' diff --git a/Gemfile.lock b/Gemfile.lock index 6c392f3..57c2896 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,3 @@ -PATH - remote: gems - specs: - asciidoctor-foodogsquared-extensions (1.0.0) - asciidoctor (~> 2.0) - rugged (~> 1.0) - GEM remote: https://rubygems.org/ specs: @@ -22,6 +15,9 @@ GEM rexml asciidoctor-diagram-ditaamini (1.0.3) asciidoctor-diagram-plantuml (1.2023.5) + asciidoctor-foodogsquared-extensions (1.0.0) + asciidoctor (~> 2.0) + rugged (~> 1.0) ast (2.4.2) bibtex-ruby (5.1.6) latex-decode (~> 0.0) @@ -85,7 +81,7 @@ DEPENDENCIES asciidoctor asciidoctor-bibtex asciidoctor-diagram - asciidoctor-foodogsquared-extensions! + asciidoctor-foodogsquared-extensions concurrent-ruby open-uri-cached rake @@ -97,4 +93,4 @@ DEPENDENCIES tilt BUNDLED WITH - 2.4.12 + 2.3.26 diff --git a/flake.lock b/flake.lock index 716c76f..4dbd876 100644 --- a/flake.lock +++ b/flake.lock @@ -34,43 +34,10 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1678875422, - "narHash": "sha256-T3o6NcQPwXjxJMn2shz86Chch4ljXgZn746c2caGxd8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "126f49a01de5b7e35a43fd43f891ecf6d3a51459", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "ruby-nix": "ruby-nix" - } - }, - "ruby-nix": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "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" + "nixpkgs": "nixpkgs" } }, "systems": { diff --git a/flake.nix b/flake.nix index b5ef8b6..937fb21 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,6 @@ 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, ... }: @@ -14,14 +13,7 @@ in inputs.flake-utils.lib.eachSystem systems (system: let - pkgs = import nixpkgs { - inherit system; - overlays = overlays ++ [ - (final: prev: { - ruby-nix = inputs.ruby-nix.lib prev; - }) - ]; - }; + pkgs = nixpkgs.legacyPackages."${system}"; in { devShells.default = import ./shell.nix { inherit pkgs; }; diff --git a/gemset.nix b/gemset.nix index 412874e..03fdc86 100644 --- a/gemset.nix +++ b/gemset.nix @@ -66,10 +66,10 @@ groups = ["default"]; platforms = []; source = { - path = "gems"; - type = "path"; + remotes = ["https://rubygems.org"]; + sha256 = "0jkc89m22fwjc4qn481rxyv5yif2yqqhw3ib4d6qkqcv2a21448g"; + type = "gem"; }; - targets = []; version = "1.0.0"; }; ast = { @@ -455,4 +455,4 @@ targets = []; version = "2.4.2"; }; -} \ No newline at end of file +} diff --git a/shell.nix b/shell.nix index 8c57af3..23a3e8e 100644 --- a/shell.nix +++ b/shell.nix @@ -3,25 +3,22 @@ with pkgs; let - localGem = ruby-nix { - name = "asciidoctor-foodogsquared-extensions"; + gems = bundlerEnv { + name = "foodogsquared-blog-gems"; ruby = ruby_3_1; - gemset = ./gemset.nix; + gemdir = ./.; }; asciidoctorWrappedWithCustomOptions = writeShellScriptBin "asciidoctor" '' - ${lib.getBin localGem.env}/bin/asciidoctor -T ./gems/templates $@ + ${lib.getBin gems}/bin/asciidoctor -T ./gems/templates $@ ''; treesitterWithPlugins = (tree-sitter.withPlugins (_: tree-sitter.allGrammars)); in mkShell { - buildInputs = [ - localGem.env - localGem.ruby - ]; - packages = [ + gems + gems.wrappedRuby asciidoctorWrappedWithCustomOptions git