diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-05-07 07:45:29 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2022-05-07 07:58:56 +0100 |
commit | 881d8649427e0d6333a609a8b0cc9ec4f81d95ce (patch) | |
tree | b7711ada0af2f7a8e1980bdfe4ac446497533294 /pkgs/desktops/gnome/games | |
parent | 94c97dfa94876f455c3eacd48ae1a9d0b24d5daa (diff) |
gnome.atomix: pull upstream fix for -fno-common toolchains
Without the change build on -fno-common toolchains fails as: $ nix build --impure --expr 'with import ~/nm {}; gnome.atomix.override { stdenv = clang13Stdenv; }' ld: src/libatomix.a.p/canvas_helper.c.o: undefined reference to symbol 'ceil@@GLIBC_2.2.5' ld: /nix/store/m4g6lswi75b739cpdx8wfxlfmcazyks9-glibc-2.34-115/lib/libm.so.6: error adding symbols: DSO missing from command line
Diffstat (limited to 'pkgs/desktops/gnome/games')
-rw-r--r-- | pkgs/desktops/gnome/games/atomix/default.nix | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/desktops/gnome/games/atomix/default.nix b/pkgs/desktops/gnome/games/atomix/default.nix index e57191f0a1dd0..7720fd1724d6f 100644 --- a/pkgs/desktops/gnome/games/atomix/default.nix +++ b/pkgs/desktops/gnome/games/atomix/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchurl, meson, ninja, pkg-config, wrapGAppsHook, python3 +{ lib, stdenv, fetchurl, fetchpatch +, meson, ninja, pkg-config, wrapGAppsHook, python3 , gettext, gnome, glib, gtk3, libgnome-games-support, gdk-pixbuf }: stdenv.mkDerivation rec { @@ -10,9 +11,24 @@ stdenv.mkDerivation rec { sha256 = "0h909a4mccf160hi0aimyicqhq2b0gk1dmqp7qwf87qghfrw6m00"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains like gcc-10: + # https://gitlab.gnome.org/GNOME/atomix/-/merge_requests/2 + (fetchpatch { + name = "fno-common.patch"; + url = "https://gitlab.gnome.org/GNOME/atomix/-/commit/be7f44f1945a569494d46c60eaf6e7b39b2bb48b.patch"; + sha256 = "0nrwl6kb1als9mxd5s0la45z63xwshqlnxqjaax32w8yrl6kz7l8"; + }) + ]; + nativeBuildInputs = [ meson ninja pkg-config gettext wrapGAppsHook python3 ]; buildInputs = [ glib gtk3 gdk-pixbuf libgnome-games-support gnome.adwaita-icon-theme ]; + # When building with clang ceil() is not inlined: + # ld: src/libatomix.a.p/canvas_helper.c.o: undefined reference to symbol 'ceil@@GLIBC_2.2.5' + # https://gitlab.gnome.org/GNOME/atomix/-/merge_requests/3 + NIX_LDFLAGS = "-lm"; + postPatch = '' chmod +x meson_post_install.py patchShebangs meson_post_install.py |