nix #1
8 changed files with 41 additions and 55 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -37,3 +37,5 @@ yarn-debug.log*
|
||||||
|
|
||||||
# ignore environment variables
|
# ignore environment variables
|
||||||
.env
|
.env
|
||||||
|
vendor/
|
||||||
|
result
|
11
Gemfile.lock
11
Gemfile.lock
|
@ -107,7 +107,7 @@ GEM
|
||||||
listen (3.7.0)
|
listen (3.7.0)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
loofah (2.12.0)
|
loofah (2.13.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
|
@ -116,12 +116,12 @@ 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)
|
nokogiri (1.12.5)
|
||||||
racc (~> 1.4)
|
mini_portile2 (~> 2.6.1)
|
||||||
nokogiri (1.12.5-x86_64-linux)
|
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
pg (1.2.3)
|
pg (1.2.3)
|
||||||
|
@ -194,7 +194,7 @@ GEM
|
||||||
rexml (~> 3.2, >= 3.2.5)
|
rexml (~> 3.2, >= 3.2.5)
|
||||||
rubyzip (>= 1.2.2)
|
rubyzip (>= 1.2.2)
|
||||||
semantic_range (3.0.0)
|
semantic_range (3.0.0)
|
||||||
spring (3.1.1)
|
spring (4.0.0)
|
||||||
sprockets (4.0.2)
|
sprockets (4.0.2)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
|
@ -234,7 +234,6 @@ GEM
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
x86_64-linux
|
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bootsnap (>= 1.4.4)
|
bootsnap (>= 1.4.4)
|
||||||
|
@ -264,4 +263,4 @@ RUBY VERSION
|
||||||
ruby 3.0.2p107
|
ruby 3.0.2p107
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.2.31
|
2.2.33
|
||||||
|
|
|
@ -37,11 +37,11 @@ development:
|
||||||
# Connect on a TCP socket. Omitted by default since the client uses a
|
# 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 socket that doesn't need configuration. Windows does not have
|
||||||
# domain sockets, so uncomment these lines.
|
# domain sockets, so uncomment these lines.
|
||||||
#host: localhost
|
host: localhost
|
||||||
|
|
||||||
# The TCP port the server listens on. Defaults to 5432.
|
# The TCP port the server listens on. Defaults to 5432.
|
||||||
# If your server runs on a different port number, change accordingly.
|
# 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. The server defaults to $user,public
|
||||||
#schema_search_path: myapp,sharedapp,public
|
#schema_search_path: myapp,sharedapp,public
|
||||||
|
@ -59,6 +59,8 @@ test:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: janus_test
|
database: janus_test
|
||||||
username: postgres
|
username: postgres
|
||||||
|
host: localhost
|
||||||
|
port: 5432
|
||||||
|
|
||||||
# As with config/credentials.yml, you never want to store sensitive information,
|
# 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
|
# like your database password, in your source code. If your source code is
|
||||||
|
|
12
default.nix
12
default.nix
|
@ -1,13 +1,17 @@
|
||||||
{stdenv, bundlerEnv, ruby_3_0}:
|
{pkgs ? import <nixpkgs> {}}:
|
||||||
|
with pkgs;
|
||||||
let
|
let
|
||||||
|
ruby = ruby_3_0;
|
||||||
gems = bundlerEnv {
|
gems = bundlerEnv {
|
||||||
name = "env";
|
name = "env";
|
||||||
inherit ruby_3_0;
|
inherit ruby;
|
||||||
gemdir = ./.;
|
gemfile = ./Gemfile;
|
||||||
|
lockfile = ./Gemfile.lock;
|
||||||
|
gemset = import ./gemset.nix;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "janus";
|
name = "janus";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
buildInputs = [gems ruby_3_0];
|
buildInputs = [gems gems.wrappedRuby yarn];
|
||||||
}
|
}
|
||||||
|
|
24
fuck.nix
24
fuck.nix
|
@ -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
|
|
||||||
];
|
|
||||||
}
|
|
20
gemset.nix
20
gemset.nix
|
@ -374,10 +374,10 @@
|
||||||
platforms = [];
|
platforms = [];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = ["https://rubygems.org"];
|
||||||
sha256 = "1nqcya57x2n58y1dify60i0dpla40n4yir928khp4nj5jrn9mgmw";
|
sha256 = "17rvbrqcci1579d7dpbsfmz1f9g7msk82lyh9ip5h29dkrnixcgg";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "2.12.0";
|
version = "2.13.0";
|
||||||
};
|
};
|
||||||
mail = {
|
mail = {
|
||||||
dependencies = ["mini_mime"];
|
dependencies = ["mini_mime"];
|
||||||
|
@ -430,6 +430,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 = [];
|
||||||
|
@ -461,7 +471,7 @@
|
||||||
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 = {
|
||||||
|
@ -761,10 +771,10 @@
|
||||||
platforms = [];
|
platforms = [];
|
||||||
source = {
|
source = {
|
||||||
remotes = ["https://rubygems.org"];
|
remotes = ["https://rubygems.org"];
|
||||||
sha256 = "0w0v6fyic3a4vq1imzcp0x4b3cgbm1gi7jn7qma9768zaqmxv8gw";
|
sha256 = "1ihmqcqylfx04bigg0fswmlvp0639f1j47kdir4g9lc76yw3c6ia";
|
||||||
type = "gem";
|
type = "gem";
|
||||||
};
|
};
|
||||||
version = "3.1.1";
|
version = "4.0.0";
|
||||||
};
|
};
|
||||||
sprockets = {
|
sprockets = {
|
||||||
dependencies = ["concurrent-ruby" "rack"];
|
dependencies = ["concurrent-ruby" "rack"];
|
||||||
|
|
6
lock.sh
Executable file
6
lock.sh
Executable 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
|
13
shell.nix
13
shell.nix
|
@ -1,13 +0,0 @@
|
||||||
with import <nixpkgs> {};
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "env";
|
|
||||||
buildInputs = [
|
|
||||||
ruby_3_0.devEnv
|
|
||||||
libxml2
|
|
||||||
libxslt
|
|
||||||
zlib
|
|
||||||
bundix
|
|
||||||
gnumake
|
|
||||||
];
|
|
||||||
}
|
|
Loading…
Reference in a new issue