Skip to content

Commit

Permalink
Merge pull request #212051 from wegank/nheko-aarch64-linux
Browse files Browse the repository at this point in the history
mtxclient, nheko: fix build on aarch64-linux
  • Loading branch information
Mic92 authored Jan 22, 2023
2 parents a79892b + a108584 commit 93915d2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ lib
, stdenv
, mkDerivation
, fetchFromGitHub
, cmake
, asciidoc
Expand All @@ -26,12 +25,13 @@
, qttools
, re2
, spdlog
, wrapQtAppsHook
, voipSupport ? true
, gst_all_1
, libnice
}:

mkDerivation rec {
stdenv.mkDerivation rec {
pname = "nheko";
version = "0.11.1";

Expand All @@ -47,6 +47,7 @@ mkDerivation rec {
cmake
lmdbxx
pkg-config
wrapQtAppsHook
];

buildInputs = [
Expand Down Expand Up @@ -82,6 +83,9 @@ mkDerivation rec {
"-DCOMPILE_QML=ON" # see https://github.com/Nheko-Reborn/nheko/issues/389
];

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

preFixup = lib.optionalString voipSupport ''
# add gstreamer plugins path to the wrapper
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/libraries/mtxclient/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ stdenv.mkDerivation rec {
spdlog
];

# https://github.com/NixOS/nixpkgs/issues/201254
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";

meta = with lib; {
description = "Client API library for the Matrix protocol.";
homepage = "https://github.com/Nheko-Reborn/mtxclient";
Expand Down
10 changes: 8 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22027,7 +22027,10 @@ with pkgs;

mtpfs = callPackage ../tools/filesystems/mtpfs { };

mtxclient = callPackage ../development/libraries/mtxclient { };
mtxclient = callPackage ../development/libraries/mtxclient {
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc11Stdenv else stdenv;
};

mu = callPackage ../tools/networking/mu {
texinfo = texinfo4;
Expand Down Expand Up @@ -31549,7 +31552,10 @@ with pkgs;

ngt = callPackage ../development/libraries/ngt { };

nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko { };
nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko {
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc11Stdenv else stdenv;
};

nomacs = libsForQt5.callPackage ../applications/graphics/nomacs { };

Expand Down

0 comments on commit 93915d2

Please sign in to comment.