From 728b0c81fee4e316b732eaca35573cc8ab018ffd Mon Sep 17 00:00:00 2001 From: squalus Date: Thu, 12 May 2022 17:08:35 -0700 Subject: [PATCH] invidious: fix build The build was broken since 52f8cf58a4504e5e219faebffa51033e400e3aec when gcc was updated from 10 to 11. This forces lsquic's version of boringssl to build with gcc 10. --- pkgs/servers/invidious/lsquic.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/invidious/lsquic.nix b/pkgs/servers/invidious/lsquic.nix index 292d37ce6cd..9c3bc68615c 100644 --- a/pkgs/servers/invidious/lsquic.nix +++ b/pkgs/servers/invidious/lsquic.nix @@ -1,9 +1,11 @@ -{ lib, boringssl, stdenv, fetchgit, fetchFromGitHub, cmake, zlib, perl, libevent }: +{ lib, boringssl, stdenv, fetchgit, fetchFromGitHub, cmake, zlib, perl, libevent, gcc10Stdenv, buildGoModule }: let versions = builtins.fromJSON (builtins.readFile ./versions.json); + buildGoModuleGcc10 = buildGoModule.override { stdenv = gcc10Stdenv; }; + # lsquic requires a specific boringssl version (noted in its README) - boringssl' = boringssl.overrideAttrs (old: { + boringssl' = (boringssl.overrideAttrs (old: { version = versions.boringssl.rev; src = fetchgit { url = "https://boringssl.googlesource.com/boringssl"; @@ -14,7 +16,9 @@ let # Use /etc/ssl/certs/ca-certificates.crt instead of /etc/ssl/cert.pem ./use-etc-ssl-certs.patch ]; - }); + })).override { + buildGoModule = buildGoModuleGcc10; + }; in stdenv.mkDerivation rec { pname = "lsquic";