diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-01 02:11:03 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-01 02:11:03 +0200 |
commit | a4993193703e14c4af10dd0ea84829594a6ee30b (patch) | |
tree | ad1474a7f748a36de6db73a19cb8bd4ba45ff320 /nixops/modules | |
parent | 3345e58db4e8364a9561dc3d488da2438aca982a (diff) | |
download | Nix-a4993193703e14c4af10dd0ea84829594a6ee30b.tar.gz Nix-a4993193703e14c4af10dd0ea84829594a6ee30b.tar.zst Nix-a4993193703e14c4af10dd0ea84829594a6ee30b.zip |
Temporarily fix mastodon package
Upgrade from 18.09 to 19.03 broke because of change at
https://github.com/NixOS/nixpkgs/pull/51842
This partially reverts the change, which permits to build again mastodon
using the latest pkgs version.
Related issue: https://git.immae.eu/mantisbt/view.php?id=131
Diffstat (limited to 'nixops/modules')
-rw-r--r-- | nixops/modules/websites/tools/mastodon/default.nix | 4 | ||||
-rw-r--r-- | nixops/modules/websites/tools/mastodon/mastodon.nix | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/nixops/modules/websites/tools/mastodon/default.nix b/nixops/modules/websites/tools/mastodon/default.nix index 9f9ea3f..cff6200 100644 --- a/nixops/modules/websites/tools/mastodon/default.nix +++ b/nixops/modules/websites/tools/mastodon/default.nix | |||
@@ -1,6 +1,6 @@ | |||
1 | { lib, pkgs, pkgsPrevious, config, myconfig, mylibs, ... }: | 1 | { lib, pkgs, config, myconfig, mylibs, ... }: |
2 | let | 2 | let |
3 | mastodon = pkgsPrevious.callPackage ./mastodon.nix { | 3 | mastodon = pkgs.callPackage ./mastodon.nix { |
4 | inherit (mylibs) fetchedGithub; | 4 | inherit (mylibs) fetchedGithub; |
5 | env = myconfig.env.tools.mastodon; | 5 | env = myconfig.env.tools.mastodon; |
6 | }; | 6 | }; |
diff --git a/nixops/modules/websites/tools/mastodon/mastodon.nix b/nixops/modules/websites/tools/mastodon/mastodon.nix index ef7ef57..bc4014d 100644 --- a/nixops/modules/websites/tools/mastodon/mastodon.nix +++ b/nixops/modules/websites/tools/mastodon/mastodon.nix | |||
@@ -4,7 +4,10 @@ let | |||
4 | socketsDir = "/run/mastodon"; | 4 | socketsDir = "/run/mastodon"; |
5 | gems = bundlerEnv { | 5 | gems = bundlerEnv { |
6 | name = "mastodon-env"; | 6 | name = "mastodon-env"; |
7 | ruby = ruby_2_5; | 7 | # https://git.immae.eu/mantisbt/view.php?id=131 |
8 | ruby = ruby_2_5.overrideAttrs(old: { | ||
9 | postInstall = builtins.replaceStrings [" --destdir $GEM_HOME"] [""] old.postInstall; | ||
10 | }); | ||
8 | gemset = ./gemset.nix; | 11 | gemset = ./gemset.nix; |
9 | gemdir = (fetchedGithub ./mastodon.json).src; | 12 | gemdir = (fetchedGithub ./mastodon.json).src; |
10 | groups = [ "default" "production" "test" "development" ]; | 13 | groups = [ "default" "production" "test" "development" ]; |
@@ -31,22 +34,20 @@ let | |||
31 | pkgConfig = { | 34 | pkgConfig = { |
32 | uws = { | 35 | uws = { |
33 | postInstall = '' | 36 | postInstall = '' |
34 | node-gyp rebuild > build_log.txt 2>&1 || true | 37 | npx node-gyp rebuild > build_log.txt 2>&1 || true |
35 | ''; | 38 | ''; |
36 | buildInputs = with pkgs; [ nodePackages.node-gyp ]; | ||
37 | }; | 39 | }; |
38 | node-zopfli = { | 40 | node-zopfli = { |
39 | postInstall = '' | 41 | postInstall = '' |
40 | node-pre-gyp install --fallback-to-build | 42 | npx node-pre-gyp install --fallback-to-build |
41 | ''; | 43 | ''; |
42 | buildInputs = with pkgs; [ nodePackages.node-pre-gyp ]; | ||
43 | }; | 44 | }; |
44 | node-sass = { | 45 | node-sass = { |
45 | buildInputs = with pkgs; [ libsass python ]; | 46 | buildInputs = with pkgs; [ libsass python ]; |
46 | postInstall = let | 47 | postInstall = let |
47 | nodeHeaders = pkgs.fetchurl { | 48 | nodeHeaders = pkgs.fetchurl { |
48 | url = "https://nodejs.org/download/release/v${pkgs.nodejs.version}/node-v${pkgs.nodejs.version}-headers.tar.gz"; | 49 | url = "https://nodejs.org/download/release/v${pkgs.nodejs.version}/node-v${pkgs.nodejs.version}-headers.tar.gz"; |
49 | sha256 = "12zzsf8my43b8qnlacp871ih5vqafl2vlpqp51xp6h3gckn2frwy"; | 50 | sha256 = "16f20ya3ys6w5w6y6l4536f7jrgk4gz46bf71w1r1xxb26a54m32"; |
50 | }; | 51 | }; |
51 | in | 52 | in |
52 | '' | 53 | '' |