Skip to content

Instantly share code, notes, and snippets.

@alexkehayias
Last active May 23, 2019 23:00
Show Gist options
  • Save alexkehayias/f5538193a40d04c48f872bdad505b740 to your computer and use it in GitHub Desktop.
Save alexkehayias/f5538193a40d04c48f872bdad505b740 to your computer and use it in GitHub Desktop.
Rails environment using Nix
with (import <nixpkgs> {});
let
rubyenv = bundlerEnv {
name = "rb";
# Setup for ruby gems using bundix generated gemset.nix
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in stdenv.mkDerivation {
name = "MyProject";
version = "0.0.1";
buildInputs = [
stdenv
git
# Ruby deps
ruby
bundler
bundix
# Rails deps
clang
libxml2
libxslt
readline
sqlite
openssl
rubyenv
];
shellHook = ''
export LIBXML2_DIR=${pkgs.libxml2}
export LIBXSLT_DIR=${pkgs.libxslt}
'';
}
source 'https://rubygems.org'
# OAuth
gem 'oauth2', '~> 1.0.0'
gem 'rails'
{
actionmailer = {
dependencies = ["actionpack" "actionview" "activejob" "mail" "rails-dom-testing"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0lw1pss1mrjm7x7qcg9pvxv55rz3d994yf3mwmlfg1y12fxq00n3";
type = "gem";
};
version = "4.2.7.1";
};
actionpack = {
dependencies = ["actionview" "activesupport" "rack" "rack-test" "rails-dom-testing" "rails-html-sanitizer"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1ray5bvlmkimjax011zsw0mz9llfkqrfm7q1avjlp4i0kpcz8zlh";
type = "gem";
};
version = "4.2.7.1";
};
actionview = {
dependencies = ["activesupport" "builder" "erubis" "rails-dom-testing" "rails-html-sanitizer"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "11m2x5nlbqrw79fh6h7m444lrka7wwy32b0dvgqg7ilbzih43k0c";
type = "gem";
};
version = "4.2.7.1";
};
activejob = {
dependencies = ["activesupport" "globalid"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0ish5wd8nvmj7f6x1i22aw5ycizy5n1z1c7f3kyxmqwhw7lb0gaz";
type = "gem";
};
version = "4.2.7.1";
};
activemodel = {
dependencies = ["activesupport" "builder"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0acz0mbmahsc9mn41275fpfnrqwig5k09m3xhz3455kv90fn79v5";
type = "gem";
};
version = "4.2.7.1";
};
activerecord = {
dependencies = ["activemodel" "activesupport" "arel"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1lk8l6i9p7qfl0pg261v5yph0w0sc0vysrdzc6bm5i5rxgi68flj";
type = "gem";
};
version = "4.2.7.1";
};
activesupport = {
dependencies = ["i18n" "json" "minitest" "thread_safe" "tzinfo"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1gds12k7nxrcc09b727a458ndidy1nfcllj9x22jcaj7pppvq6r4";
type = "gem";
};
version = "4.2.7.1";
};
arel = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk";
type = "gem";
};
version = "6.0.3";
};
builder = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "14fii7ab8qszrvsvhz6z2z3i4dw0h41a62fjr2h1j8m41vbrmyv2";
type = "gem";
};
version = "3.2.2";
};
concurrent-ruby = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1kb4sav7yli12pjr8lscv8z49g52a5xzpfg3z9h8clzw6z74qjsw";
type = "gem";
};
version = "1.0.2";
};
erubis = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3";
type = "gem";
};
version = "2.7.0";
};
faraday = {
dependencies = ["multipart-post"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1kplqkpn2s2yl3lxdf6h7sfldqvkbkpxwwxhyk7mdhjplb5faqh6";
type = "gem";
};
version = "0.9.2";
};
globalid = {
dependencies = ["activesupport"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "11plkgyl3w9k4y2scc1igvpgwyz4fnmsr63h2q4j8wkb48nlnhak";
type = "gem";
};
version = "0.3.7";
};
i18n = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1i5z1ykl8zhszsxcs8mzl8d0dxgs3ylz8qlzrw74jb0gplkx6758";
type = "gem";
};
version = "0.7.0";
};
json = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1nsby6ry8l9xg3yw4adlhk2pnc7i0h0rznvcss4vk3v74qg0k8lc";
type = "gem";
};
version = "1.8.3";
};
jwt = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0s5llb4mhpy0phzbrc4jd2jd2b91h1axy4bhci7g1bdz1w2m3a2i";
type = "gem";
};
version = "1.5.4";
};
loofah = {
dependencies = ["nokogiri"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "109ps521p0sr3kgc460d58b4pr1z4mqggan2jbsf0aajy9s6xis8";
type = "gem";
};
version = "2.0.3";
};
mail = {
dependencies = ["mime-types"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0c9vqfy0na9b5096i5i4qvrvhwamjnmajhgqi3kdsdfl8l6agmkp";
type = "gem";
};
version = "2.6.4";
};
mime-types = {
dependencies = ["mime-types-data"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m";
type = "gem";
};
version = "3.1";
};
mime-types-data = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm";
type = "gem";
};
version = "3.2016.0521";
};
mini_portile2 = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1y25adxb1hgg1wb2rn20g3vl07qziq6fz364jc5694611zz863hb";
type = "gem";
};
version = "2.1.0";
};
minitest = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1gfzf7112vffcwamfny06pz4wr16xdihz666m1s47v077560nrll";
type = "gem";
};
version = "5.9.0";
};
multi_json = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1wpc23ls6v2xbk3l1qncsbz16npvmw8p0b38l8czdzri18mp51xk";
type = "gem";
};
version = "1.12.1";
};
multi_xml = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0i8r7dsz4z79z3j023l8swan7qpbgxbwwz11g38y2vjqjk16v4q8";
type = "gem";
};
version = "0.5.5";
};
multipart-post = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x";
type = "gem";
};
version = "2.0.0";
};
nokogiri = {
dependencies = ["mini_portile2" "pkg-config"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "17pjhvm4yigriizxbbpx266nnh6nckdm33m3j4ws9dcg99daz91p";
type = "gem";
};
version = "1.6.8";
};
oauth2 = {
dependencies = ["faraday" "jwt" "multi_json" "multi_xml" "rack"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0zaa7qnvizv363apmxx9vxa8f6c6xy70z0jm0ydx38xvhxr8898r";
type = "gem";
};
version = "1.0.0";
};
pkg-config = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0lljiqnm0b4z6iy87lzapwrdfa6ps63x2z5zbs038iig8dqx2g0z";
type = "gem";
};
version = "1.1.7";
};
rack = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "09bs295yq6csjnkzj7ncj50i6chfxrhmzg1pk6p0vd2lb9ac8pj5";
type = "gem";
};
version = "1.6.4";
};
rack-test = {
dependencies = ["rack"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0h6x5jq24makgv2fq5qqgjlrk74dxfy62jif9blk43llw8ib2q7z";
type = "gem";
};
version = "0.6.3";
};
rails = {
dependencies = ["actionmailer" "actionpack" "actionview" "activejob" "activemodel" "activerecord" "activesupport" "railties" "sprockets-rails"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1avd16ir7qx23dcnz1b3cafq1lja6rq0w222bs658p9n33rbw54l";
type = "gem";
};
version = "4.2.7.1";
};
rails-deprecated_sanitizer = {
dependencies = ["activesupport"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0qxymchzdxww8bjsxj05kbf86hsmrjx40r41ksj0xsixr2gmhbbj";
type = "gem";
};
version = "1.0.3";
};
rails-dom-testing = {
dependencies = ["activesupport" "nokogiri" "rails-deprecated_sanitizer"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1v8jl6803mbqpxh4hn0szj081q1a3ap0nb8ni0qswi7z4la844v8";
type = "gem";
};
version = "1.0.7";
};
rails-html-sanitizer = {
dependencies = ["loofah"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "138fd86kv073zqfx0xifm646w6bgw2lr8snk16lknrrfrss8xnm7";
type = "gem";
};
version = "1.0.3";
};
railties = {
dependencies = ["actionpack" "activesupport" "rake" "thor"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "04rz7cn64zzvq7lnhc9zqmaqmqkq84q25v0ym9lcw75j1cj1mrq4";
type = "gem";
};
version = "4.2.7.1";
};
rake = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0m7fk7n0q459b1866cpq0gyz6904srhajrag0ybpdyl5sw4c2xff";
type = "gem";
};
version = "11.2.2";
};
sprockets = {
dependencies = ["concurrent-ruby" "rack"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0jzsfiladswnzbrwqfiaj1xip68y58rwx0lpmj907vvq47k87gj1";
type = "gem";
};
version = "3.7.0";
};
sprockets-rails = {
dependencies = ["actionpack" "activesupport" "sprockets"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1sak0as7ka964f6zjb1w8hkvfkkbf55kpcyvh7k6nyrb6pqnwmnf";
type = "gem";
};
version = "3.1.1";
};
thor = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "08p5gx18yrbnwc6xc0mxvsfaxzgy2y9i78xq7ds0qmdm67q39y4z";
type = "gem";
};
version = "0.19.1";
};
thread_safe = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1hq46wqsyylx5afkp6jmcihdpv4ynzzq9ygb6z2pb1cbz5js0gcr";
type = "gem";
};
version = "0.3.5";
};
tzinfo = {
dependencies = ["thread_safe"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1c01p3kg6xvy1cgjnzdfq45fggbwish8krd0h864jvbpybyx7cgx";
type = "gem";
};
version = "1.2.2";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment