This commit is contained in:
jane 2021-11-24 15:15:00 -05:00
parent 42b6ba7ef7
commit 7c3182c8a8
6 changed files with 113 additions and 24 deletions

View File

@ -3,6 +3,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.0.2'
gem 'nokogiri', '>= 1.12.5'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
# Use postgresql as the database for Active Record
@ -18,7 +19,7 @@ gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
@ -55,4 +56,4 @@ end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'devise'
gem 'dotenv-rails', groups: [:development, :test]
gem 'dotenv-rails', groups: [:development, :test]

View File

@ -110,9 +110,13 @@ GEM
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
minitest (5.14.4)
msgpack (1.4.2)
nio4r (2.5.8)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
nokogiri (1.12.5-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
@ -158,6 +162,7 @@ GEM
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.5.1)
regexp_parser (2.1.1)
responders (3.0.1)
actionpack (>= 5.0)
@ -218,6 +223,7 @@ GEM
zeitwerk (2.5.1)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
@ -228,10 +234,12 @@ DEPENDENCIES
dotenv-rails
jbuilder (~> 2.7)
listen (~> 3.3)
nokogiri (>= 1.12.5)
pg (~> 1.1)
puma (~> 5.0)
rack-mini-profiler (~> 2.0)
rails (~> 6.1.4, >= 6.1.4.1)
redis (~> 4.0)
sass-rails (>= 6)
selenium-webdriver
spring

View File

@ -1,16 +1,16 @@
{pkgs ? import <nixpkgs>{}}:
with pkgs;
let
ruby = ruby_3_0;
rubyEnv = bundlerEnv {
name = "env-proto";
ruby = ruby_3_0;
name = "project-bundler-env";
inherit ruby;
gemdir = ./.;
};
in
mkShell {
buildInputs = [
rubyEnv
ruby_3_0
bundix
rubyEnv.wrappedRuby
];
}

View File

@ -389,6 +389,16 @@
};
version = "1.1.2";
};
mini_portile2 = {
groups = ["default" "development" "test"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1lvxm91hi0pabnkkg47wh1siv56s6slm2mdq1idfm86dyfidfprq";
type = "gem";
};
version = "2.6.1";
};
minitest = {
groups = ["default" "development" "test"];
platforms = [];
@ -420,12 +430,12 @@
version = "2.5.8";
};
nokogiri = {
dependencies = ["racc"];
dependencies = ["mini_portile2" "racc"];
groups = ["default" "development" "test"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1skckpv9nm8q2xh34i3yqv9z4mk6y3smm85axm6lv427l78chs08";
sha256 = "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b";
type = "gem";
};
version = "1.12.5";
@ -599,6 +609,16 @@
};
version = "0.10.1";
};
redis = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "03r9739q3vq38g456snf3rk9hadf955bs5im6qs6m69h19mrz2yw";
type = "gem";
};
version = "4.5.1";
};
regexp_parser = {
groups = ["default" "test"];
platforms = [];

View File

@ -1,16 +1,28 @@
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "env";
buildInputs = [
ruby_3_0.devEnv
git
sqlite
libpcap
postgresql
libxml2
libxslt
pkg-config
bundix
gnumake
];
}
with (import <nixpkgs> {});
let ruby = ruby_3_0;
in
ruby.withPackages (
ps: with ps; [
nokogiri
rails
pg
puma
sass-rails
webpacker
turbolinks
jbuilder
redis
bootsnap
web-console
rack-mini-profiler
listen
spring
capybara
selenium-webdriver
webdrivers
tzinfo-data
devise
dotenv-rails
]
)

48
shell_broken.nix Normal file
View File

@ -0,0 +1,48 @@
with (import <nixpkgs> {});
with builtins;
let
ruby = ruby_3_0;
minitest = buildRubyGem {
inherit ruby;
gemName = "minitest";
type = "gem";
version = "5.10.1";
source.sha256 = "1yk2m8sp0p5m1niawa3ncg157a4i0594cg7z91rzjxv963rzrwab";
gemPath = [];
};
rake = buildRubyGem {
inherit ruby;
gemName = "rake";
type = "gem";
version = "12.0.0";
source.sha256 = "01j8fc9bqjnrsxbppncai05h43315vmz9fwg28qdsgcjw9ck1d7n";
gemPath = [];
};
srcWithout = rootPath: ignoredPaths:
let
ignoreStrings = map (path: toString path ) ignoredPaths;
in
filterSource (path: type: (all (i: i != path) ignoreStrings)) rootPath;
in
stdenv.mkDerivation {
name = "bundix";
src = builtins.fetchGit {
url = "https://github.com/jdelStrother/bundix.git";
ref = "multi-platform";
};
phases = "installPhase";
installPhase = ''
mkdir -p $out
makeWrapper $src/bin/bundix $out/bin/bundix \
--prefix PATH : "${nix.out}/bin" \
--prefix PATH : "${nix-prefetch-git.out}/bin" \
--set GEM_PATH "${bundler}/${bundler.ruby.gemPath}"
'';
nativeBuildInputs = [makeWrapper];
buildInputs = [bundler ruby minitest rake nix-prefetch-scripts git sqlite libpcap postgresql libxml2 libxslt pkg-config gnumake];
}