nix #1

Merged
jane merged 4 commits from nix into master 2021-12-10 19:24:58 +00:00
8 changed files with 41 additions and 55 deletions
Showing only changes of commit 67d4246eea - Show all commits

4
.gitignore vendored
View file

@ -36,4 +36,6 @@ yarn-debug.log*
.yarn-integrity
# ignore environment variables
.env
.env
vendor/
result

View file

@ -107,7 +107,7 @@ GEM
listen (3.7.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.12.0)
loofah (2.13.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
@ -116,12 +116,12 @@ 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)
racc (~> 1.4)
nokogiri (1.12.5-x86_64-linux)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
orm_adapter (0.5.0)
pg (1.2.3)
@ -194,7 +194,7 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
spring (3.1.1)
spring (4.0.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
@ -234,7 +234,6 @@ GEM
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
bootsnap (>= 1.4.4)
@ -264,4 +263,4 @@ RUBY VERSION
ruby 3.0.2p107
BUNDLED WITH
2.2.31
2.2.33

View file

@ -37,11 +37,11 @@ development:
# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
#host: localhost
host: localhost
# The TCP port the server listens on. Defaults to 5432.
# If your server runs on a different port number, change accordingly.
#port: 5432
port: 5432
# Schema search path. The server defaults to $user,public
#schema_search_path: myapp,sharedapp,public
@ -59,6 +59,8 @@ test:
<<: *default
database: janus_test
username: postgres
host: localhost
port: 5432
# As with config/credentials.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is

View file

@ -1,13 +1,17 @@
{stdenv, bundlerEnv, ruby_3_0}:
{pkgs ? import <nixpkgs> {}}:
with pkgs;
let
ruby = ruby_3_0;
gems = bundlerEnv {
name = "env";
inherit ruby_3_0;
gemdir = ./.;
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = import ./gemset.nix;
};
in
stdenv.mkDerivation {
name = "janus";
src = ./.;
buildInputs = [gems ruby_3_0];
buildInputs = [gems gems.wrappedRuby yarn];
}

View file

@ -1,24 +0,0 @@
{pkgs ? import <nixpkgs>{}}:
with pkgs;
let
ruby = ruby_3_0;
rubyEnv = bundlerEnv {
name = "project-bundler-env";
inherit ruby;
gemdir = ./.;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in
mkShell {
nativeBuildInputs = [
#rubyPackages_3_0.nokogiri
];
buildInputs = [
#rubyPackages_3_0.nokogiri
rubyEnv
rubyEnv.wrappedRuby
yarn
];
}

View file

@ -374,10 +374,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1nqcya57x2n58y1dify60i0dpla40n4yir928khp4nj5jrn9mgmw";
sha256 = "17rvbrqcci1579d7dpbsfmz1f9g7msk82lyh9ip5h29dkrnixcgg";
type = "gem";
};
version = "2.12.0";
version = "2.13.0";
};
mail = {
dependencies = ["mini_mime"];
@ -430,6 +430,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 = [];
@ -461,7 +471,7 @@
version = "2.5.8";
};
nokogiri = {
dependencies = ["racc"];
dependencies = ["mini_portile2" "racc"];
groups = ["default" "development" "test"];
platforms = [];
source = {
@ -761,10 +771,10 @@
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0w0v6fyic3a4vq1imzcp0x4b3cgbm1gi7jn7qma9768zaqmxv8gw";
sha256 = "1ihmqcqylfx04bigg0fswmlvp0639f1j47kdir4g9lc76yw3c6ia";
type = "gem";
};
version = "3.1.1";
version = "4.0.0";
};
sprockets = {
dependencies = ["concurrent-ruby" "rack"];

6
lock.sh Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p ruby_3_0 bundler bundix
rm -f gemset.nix Gemfile.lock
BUNDLE_FORCE_RUBY_PLATFORM=1 bundle lock
bundix --ruby=ruby_3_0

View file

@ -1,13 +0,0 @@
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "env";
buildInputs = [
ruby_3_0.devEnv
libxml2
libxslt
zlib
bundix
gnumake
];
}