contrib/nix/ruby2.6-shell.nix (911B) - raw
1 let
2 pkgs = import (builtins.fetchGit {
3 url = "https://github.com/NixOS/nixpkgs";
4 ref = "refs/heads/master";
5 rev = "3ef1d2a9602c18f8742e1fb63d5ae9867092e3d6";
6 }) {};
7 gems = pkgs.bundlerEnv {
8 name = "ruby2.6-gems-for-sup";
9 ruby = pkgs.ruby_2_6;
10 gemfile = ./Gemfile;
11 lockfile = ./ruby2.6-Gemfile.lock;
12 gemset = ./ruby2.6-gemset.nix;
13 gemConfig = pkgs.defaultGemConfig // {
14 fiddle = attrs: {
15 buildInputs = [ pkgs.libffi ];
16 };
17 # Workaround: remove rake from nativeBuildInputs, otherwise it causes
18 # xapian-bindings to build against the default Ruby version
19 # instead of our chosen version.
20 xapian-ruby = attrs: pkgs.defaultGemConfig.xapian-ruby attrs // {
21 dependencies = [ "rake" ];
22 nativeBuildInputs = [ pkgs.pkg-config ];
23 };
24 };
25 };
26 in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; }