diff options
-rw-r--r-- | nixops/modules/websites/tools/mastodon/default.nix | 4 | ||||
-rw-r--r-- | nixops/modules/websites/tools/mastodon/mastodon.nix | 13 | ||||
-rwxr-xr-x | nixops/scripts/nixops_wrap | 8 |
3 files changed, 13 insertions, 12 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 | '' |
diff --git a/nixops/scripts/nixops_wrap b/nixops/scripts/nixops_wrap index d6b66bd..bf41e81 100755 --- a/nixops/scripts/nixops_wrap +++ b/nixops/scripts/nixops_wrap | |||
@@ -29,9 +29,9 @@ done | |||
29 | nixops set-args --argstr privateFiles "$TEMP" | 29 | nixops set-args --argstr privateFiles "$TEMP" |
30 | 30 | ||
31 | # This will automatically upgrade to latest version at each build | 31 | # This will automatically upgrade to latest version at each build |
32 | # nixpkgsNext="https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz" | 32 | # nixpkgs="https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz" |
33 | nixpkgsNext="https://releases.nixos.org/nixos/19.03/nixos-19.03beta171840.23fd1394dc6/nixexprs.tar.xz" | 33 | nixpkgs="https://releases.nixos.org/nixos/19.03/nixos-19.03beta171840.23fd1394dc6/nixexprs.tar.xz" |
34 | nixpkgsPrevious="https://releases.nixos.org/nixos/18.09/nixos-18.09.1834.9d608a6f592/nixexprs.tar.xz" | 34 | nixpkgsPrevious="$nixpkgs" |
35 | nixpkgs="$nixpkgsNext" | 35 | nixpkgsNext="$nixpkgs" |
36 | export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious" | 36 | export NIX_PATH="ssh-config-file=$(dirname $DIR)/ssh/config:nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious" |
37 | nixops "$@" | 37 | nixops "$@" |