From a4993193703e14c4af10dd0ea84829594a6ee30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 1 Apr 2019 02:11:03 +0200 Subject: 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 --- nixops/modules/websites/tools/mastodon/default.nix | 4 ++-- nixops/modules/websites/tools/mastodon/mastodon.nix | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'nixops/modules') 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 @@ -{ lib, pkgs, pkgsPrevious, config, myconfig, mylibs, ... }: +{ lib, pkgs, config, myconfig, mylibs, ... }: let - mastodon = pkgsPrevious.callPackage ./mastodon.nix { + mastodon = pkgs.callPackage ./mastodon.nix { inherit (mylibs) fetchedGithub; env = myconfig.env.tools.mastodon; }; 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 socketsDir = "/run/mastodon"; gems = bundlerEnv { name = "mastodon-env"; - ruby = ruby_2_5; + # https://git.immae.eu/mantisbt/view.php?id=131 + ruby = ruby_2_5.overrideAttrs(old: { + postInstall = builtins.replaceStrings [" --destdir $GEM_HOME"] [""] old.postInstall; + }); gemset = ./gemset.nix; gemdir = (fetchedGithub ./mastodon.json).src; groups = [ "default" "production" "test" "development" ]; @@ -31,22 +34,20 @@ let pkgConfig = { uws = { postInstall = '' - node-gyp rebuild > build_log.txt 2>&1 || true + npx node-gyp rebuild > build_log.txt 2>&1 || true ''; - buildInputs = with pkgs; [ nodePackages.node-gyp ]; }; node-zopfli = { postInstall = '' - node-pre-gyp install --fallback-to-build + npx node-pre-gyp install --fallback-to-build ''; - buildInputs = with pkgs; [ nodePackages.node-pre-gyp ]; }; node-sass = { buildInputs = with pkgs; [ libsass python ]; postInstall = let nodeHeaders = pkgs.fetchurl { url = "https://nodejs.org/download/release/v${pkgs.nodejs.version}/node-v${pkgs.nodejs.version}-headers.tar.gz"; - sha256 = "12zzsf8my43b8qnlacp871ih5vqafl2vlpqp51xp6h3gckn2frwy"; + sha256 = "16f20ya3ys6w5w6y6l4536f7jrgk4gz46bf71w1r1xxb26a54m32"; }; in '' -- cgit v1.2.3