nix #1
6 changed files with 113 additions and 24 deletions
3
Gemfile
3
Gemfile
|
@ -3,6 +3,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
||||||
|
|
||||||
ruby '3.0.2'
|
ruby '3.0.2'
|
||||||
|
|
||||||
|
gem 'nokogiri', '>= 1.12.5'
|
||||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
|
||||||
gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
|
gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
|
||||||
# Use postgresql as the database for Active Record
|
# 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
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||||
gem 'jbuilder', '~> 2.7'
|
gem 'jbuilder', '~> 2.7'
|
||||||
# Use Redis adapter to run Action Cable in production
|
# Use Redis adapter to run Action Cable in production
|
||||||
# gem 'redis', '~> 4.0'
|
gem 'redis', '~> 4.0'
|
||||||
# Use Active Model has_secure_password
|
# Use Active Model has_secure_password
|
||||||
# gem 'bcrypt', '~> 3.1.7'
|
# gem 'bcrypt', '~> 3.1.7'
|
||||||
|
|
||||||
|
|
|
@ -110,9 +110,13 @@ GEM
|
||||||
matrix (0.4.2)
|
matrix (0.4.2)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mini_mime (1.1.2)
|
mini_mime (1.1.2)
|
||||||
|
mini_portile2 (2.6.1)
|
||||||
minitest (5.14.4)
|
minitest (5.14.4)
|
||||||
msgpack (1.4.2)
|
msgpack (1.4.2)
|
||||||
nio4r (2.5.8)
|
nio4r (2.5.8)
|
||||||
|
nokogiri (1.12.5)
|
||||||
|
mini_portile2 (~> 2.6.1)
|
||||||
|
racc (~> 1.4)
|
||||||
nokogiri (1.12.5-x86_64-linux)
|
nokogiri (1.12.5-x86_64-linux)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
|
@ -158,6 +162,7 @@ GEM
|
||||||
rb-fsevent (0.11.0)
|
rb-fsevent (0.11.0)
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
|
redis (4.5.1)
|
||||||
regexp_parser (2.1.1)
|
regexp_parser (2.1.1)
|
||||||
responders (3.0.1)
|
responders (3.0.1)
|
||||||
actionpack (>= 5.0)
|
actionpack (>= 5.0)
|
||||||
|
@ -218,6 +223,7 @@ GEM
|
||||||
zeitwerk (2.5.1)
|
zeitwerk (2.5.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
ruby
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
@ -228,10 +234,12 @@ DEPENDENCIES
|
||||||
dotenv-rails
|
dotenv-rails
|
||||||
jbuilder (~> 2.7)
|
jbuilder (~> 2.7)
|
||||||
listen (~> 3.3)
|
listen (~> 3.3)
|
||||||
|
nokogiri (>= 1.12.5)
|
||||||
pg (~> 1.1)
|
pg (~> 1.1)
|
||||||
puma (~> 5.0)
|
puma (~> 5.0)
|
||||||
rack-mini-profiler (~> 2.0)
|
rack-mini-profiler (~> 2.0)
|
||||||
rails (~> 6.1.4, >= 6.1.4.1)
|
rails (~> 6.1.4, >= 6.1.4.1)
|
||||||
|
redis (~> 4.0)
|
||||||
sass-rails (>= 6)
|
sass-rails (>= 6)
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
spring
|
spring
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{pkgs ? import <nixpkgs>{}}:
|
{pkgs ? import <nixpkgs>{}}:
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
|
ruby = ruby_3_0;
|
||||||
rubyEnv = bundlerEnv {
|
rubyEnv = bundlerEnv {
|
||||||
name = "env-proto";
|
name = "project-bundler-env";
|
||||||
ruby = ruby_3_0;
|
inherit ruby;
|
||||||
gemdir = ./.;
|
gemdir = ./.;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
mkShell {
|
mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
rubyEnv
|
rubyEnv
|
||||||
ruby_3_0
|
rubyEnv.wrappedRuby
|
||||||
bundix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
24
gemset.nix
24
gemset.nix
|
@ -389,6 +389,16 @@
|
||||||
};
|
};
|
||||||
version = "1.1.2";
|
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 = {
|
minitest = {
|
||||||
groups = ["default" "development" "test"];
|
groups = ["default" "development" "test"];
|
||||||
platforms = [];
|
platforms = [];
|
||||||
|
@ -420,12 +430,12 @@
|
||||||
version = "2.5.8";
|
version = "2.5.8";
|
||||||
};
|
};
|
||||||
nokogiri = {
|
nokogiri = {
|
||||||
dependencies = ["racc"];
|
dependencies = ["mini_portile2" "racc"];
|
||||||
groups = ["default" "development" "test"];
|
groups = ["default" "development" "test"];
|
||||||
platforms = [];
|
platforms = [];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = ["https://rubygems.org"];
|
||||||
sha256 = "1skckpv9nm8q2xh34i3yqv9z4mk6y3smm85axm6lv427l78chs08";
|
sha256 = "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "1.12.5";
|
version = "1.12.5";
|
||||||
|
@ -599,6 +609,16 @@
|
||||||
};
|
};
|
||||||
version = "0.10.1";
|
version = "0.10.1";
|
||||||
};
|
};
|
||||||
|
redis = {
|
||||||
|
groups = ["default"];
|
||||||
|
platforms = [];
|
||||||
|
source = {
|
||||||
|
remotes = ["https://rubygems.org"];
|
||||||
|
sha256 = "03r9739q3vq38g456snf3rk9hadf955bs5im6qs6m69h19mrz2yw";
|
||||||
|
type = "gem";
|
||||||
|
};
|
||||||
|
version = "4.5.1";
|
||||||
|
};
|
||||||
regexp_parser = {
|
regexp_parser = {
|
||||||
groups = ["default" "test"];
|
groups = ["default" "test"];
|
||||||
platforms = [];
|
platforms = [];
|
||||||
|
|
44
shell.nix
44
shell.nix
|
@ -1,16 +1,28 @@
|
||||||
with import <nixpkgs> {};
|
with (import <nixpkgs> {});
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "env";
|
let ruby = ruby_3_0;
|
||||||
buildInputs = [
|
in
|
||||||
ruby_3_0.devEnv
|
ruby.withPackages (
|
||||||
git
|
ps: with ps; [
|
||||||
sqlite
|
nokogiri
|
||||||
libpcap
|
rails
|
||||||
postgresql
|
pg
|
||||||
libxml2
|
puma
|
||||||
libxslt
|
sass-rails
|
||||||
pkg-config
|
webpacker
|
||||||
bundix
|
turbolinks
|
||||||
gnumake
|
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
48
shell_broken.nix
Normal 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];
|
||||||
|
}
|
Loading…
Reference in a new issue