2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch
|
|
|
|
, meson, ninja, pkg-config, wrapGAppsHook, python3
|
2021-05-20 23:08:51 +00:00
|
|
|
, gettext, gnome, glib, gtk3, libgnome-games-support, gdk-pixbuf }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "atomix";
|
|
|
|
version = "3.34.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-28 23:13:55 +00:00
|
|
|
url = "mirror://gnome/sources/atomix/${lib.versions.majorMinor version}/atomix-${version}.tar.xz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0h909a4mccf160hi0aimyicqhq2b0gk1dmqp7qwf87qghfrw6m00";
|
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config gettext wrapGAppsHook python3 ];
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ glib gtk3 gdk-pixbuf libgnome-games-support gnome.adwaita-icon-theme ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
# 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";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson_post_install.py
|
|
|
|
patchShebangs meson_post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = pname;
|
2021-05-20 23:08:51 +00:00
|
|
|
attrPath = "gnome.${pname}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Puzzle game where you move atoms to build a molecule";
|
|
|
|
homepage = "https://wiki.gnome.org/Apps/Atomix";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = teams.gnome.members;
|
2022-12-02 08:20:57 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|