Skip to content

Instantly share code, notes, and snippets.

@manveru
Last active April 23, 2018 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manveru/0b835aba2ec71308bdc1c540db768c1f to your computer and use it in GitHub Desktop.
Save manveru/0b835aba2ec71308bdc1c540db768c1f to your computer and use it in GitHub Desktop.
building EM
source 'https://rubygems.org' do
gem 'eventmachine'
end
with (import (fetchGit {
url = https://github.com/NixOS/nixpkgs-channels;
ref = "nixpkgs-unstable";
rev = "255a833e841628c0b834575664eae373e28cdc27";
}) {});
let
ruby = ruby_2_5;
bundler = pkgs.bundler.override { inherit ruby; };
bundix = pkgs.bundix.override { inherit bundler; };
env = if builtins.pathExists ./gemset.nix
then
let gems = bundlerEnv {
inherit ruby;
name = "test-gems";
gemdir = ./.;
}; in [ gems.wrappedRuby (lowPrio gems) ]
else builtins.trace "to get your gems, please run bundix -l" [];
in stdenv.mkDerivation {
name = "test-shell";
buildInputs = [
bundler
bundix
] ++ env;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment