diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-29 09:07:36 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-29 09:07:36 +0100 |
commit | 7ac9bef4930a10101f02cbfdc4c75351e98553d6 (patch) | |
tree | 156519c9d3fcaf11e956e5c1a72fa199bace5fa3 /nixops/modules/websites/tools/diaspora/diaspora.nix | |
parent | 61199e9367515ec28f2a24903ea12a7b6747c9c0 (diff) | |
download | Nix-7ac9bef4930a10101f02cbfdc4c75351e98553d6.tar.gz Nix-7ac9bef4930a10101f02cbfdc4c75351e98553d6.tar.zst Nix-7ac9bef4930a10101f02cbfdc4c75351e98553d6.zip |
Upgrade diaspora to latest version
Remove Gemfile and Gemfile.lock and use instead the ones from the
repository
Diffstat (limited to 'nixops/modules/websites/tools/diaspora/diaspora.nix')
-rw-r--r-- | nixops/modules/websites/tools/diaspora/diaspora.nix | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/nixops/modules/websites/tools/diaspora/diaspora.nix b/nixops/modules/websites/tools/diaspora/diaspora.nix index 778fe26..616c5cc 100644 --- a/nixops/modules/websites/tools/diaspora/diaspora.nix +++ b/nixops/modules/websites/tools/diaspora/diaspora.nix | |||
@@ -1,25 +1,31 @@ | |||
1 | { env, fetchedGithub, stdenv, defaultGemConfig, writeText, bundlerEnv, ruby_2_4, pkgs, cacert }: | 1 | { env, fetchedGithub, stdenv, defaultGemConfig, writeText, bundlerEnv, ruby_2_4, pkgs, cacert }: |
2 | let | 2 | let |
3 | gems = bundlerEnv { | ||
4 | name = "diaspora-env"; | ||
5 | ruby = ruby_2_4; | ||
6 | gemdir = ./.; | ||
7 | gemConfig = defaultGemConfig // { | ||
8 | kostya-sigar = attrs: { | ||
9 | buildInputs = with pkgs; [ pkgs.perl ]; | ||
10 | }; | ||
11 | }; | ||
12 | }; | ||
13 | varDir = "/var/lib/diaspora_immae"; | 3 | varDir = "/var/lib/diaspora_immae"; |
14 | socketsDir = "/run/diaspora"; | 4 | socketsDir = "/run/diaspora"; |
15 | diaspora = stdenv.mkDerivation (fetchedGithub ./diaspora.json // rec { | 5 | diaspora = stdenv.mkDerivation (fetchedGithub ./diaspora.json // rec { |
16 | buildPhase = '' | 6 | buildPhase = '' |
17 | patch -p1 < ${./ldap.patch} | 7 | patch -p1 < ${./ldap.patch} |
8 | # FIXME: bundlerEnv below doesn't take postgresql group for some | ||
9 | # reason | ||
10 | echo 'gem "pg", "1.1.3"' >> Gemfile | ||
18 | ''; | 11 | ''; |
19 | installPhase = '' | 12 | installPhase = '' |
20 | cp -a . $out | 13 | cp -a . $out |
21 | ''; | 14 | ''; |
22 | }); | 15 | }); |
16 | gems = bundlerEnv { | ||
17 | name = "diaspora-env"; | ||
18 | ruby = ruby_2_4; | ||
19 | gemfile = "${diaspora}/Gemfile"; | ||
20 | lockfile = "${diaspora}/Gemfile.lock"; | ||
21 | gemset = ./gemset.nix; | ||
22 | groups = [ "postgresql" "default" "production" ]; | ||
23 | gemConfig = defaultGemConfig // { | ||
24 | kostya-sigar = attrs: { | ||
25 | buildInputs = [ pkgs.perl ]; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
23 | secret_token = writeText "secret_token.rb" '' | 29 | secret_token = writeText "secret_token.rb" '' |
24 | Diaspora::Application.config.secret_key_base = '${env.secret_token}' | 30 | Diaspora::Application.config.secret_key_base = '${env.secret_token}' |
25 | ''; | 31 | ''; |