diff --git a/pkgs/desktops/gnome-3/core/gnome-software/default.nix b/pkgs/desktops/gnome-3/core/gnome-software/default.nix index df150202cacc..8996a4cc3e93 100644 --- a/pkgs/desktops/gnome-3/core/gnome-software/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-software/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, meson, ninja, gettext, gnome3, wrapGAppsHook, packagekit, ostree -, glib, appstream-glib, libsoup, polkit, attr, acl, libyaml, isocodes, gtkspell3, libxslt +{ stdenv, fetchurl, substituteAll, pkgconfig, meson, ninja, gettext, gnome3, wrapGAppsHook, packagekit, ostree +, glib, appstream-glib, libsoup, polkit, isocodes, gtkspell3, libxslt , json-glib, libsecret, valgrind-light, docbook_xsl, docbook_xml_dtd_42, gtk-doc, desktop-file-utils }: stdenv.mkDerivation rec { @@ -11,24 +11,28 @@ stdenv.mkDerivation rec { sha256 = "00lfzvlicqd8gk5ijnjdi36ikmhdzvfjj993rpf7mm04ncw4k0za"; }; - passthru = { - updateScript = gnome3.updateScript { packageName = "gnome-software"; attrPath = "gnome3.gnome-software"; }; - }; + patches = [ + (substituteAll { + src = ./fix-paths.patch; + inherit isocodes; + }) + ]; - nativeBuildInputs = [ pkgconfig meson ninja gettext wrapGAppsHook libxslt docbook_xml_dtd_42 - valgrind-light docbook_xsl gtk-doc desktop-file-utils ]; - buildInputs = [ gnome3.gtk glib packagekit appstream-glib libsoup - gnome3.gsettings-desktop-schemas gnome3.gnome-desktop - gtkspell3 json-glib libsecret ostree - polkit attr acl libyaml ]; - propagatedBuildInputs = [ isocodes ]; + nativeBuildInputs = [ + meson ninja pkgconfig gettext wrapGAppsHook libxslt docbook_xml_dtd_42 + valgrind-light docbook_xsl gtk-doc desktop-file-utils + ]; + buildInputs = [ + gnome3.gtk glib packagekit appstream-glib libsoup + gnome3.gsettings-desktop-schemas gnome3.gnome-desktop + gtkspell3 json-glib libsecret ostree + polkit + ]; + + # https://gitlab.gnome.org/GNOME/gnome-software/issues/320 NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; - postPatch = '' - patchShebangs meson_post_install.sh - ''; - mesonFlags = [ "-Denable-flatpak=false" "-Denable-rpm=false" @@ -38,18 +42,18 @@ stdenv.mkDerivation rec { "-Denable-gudev=false" ]; - postInstall = '' - mkdir -p $out/share/xml/ - ln -s ${isocodes}/share/xml/iso-codes $out/share/xml/iso-codes - ''; - - enableParallelBuilding = true; + passthru = { + updateScript = gnome3.updateScript { + packageName = "gnome-software"; + attrPath = "gnome3.gnome-software"; + }; + }; meta = with stdenv.lib; { - homepage = https://www.freedesktop.org/software/PackageKit/; - platforms = platforms.linux; - maintainers = gnome3.maintainers; + description = "Software store that lets you install and update applications and system extensions"; + homepage = https://wiki.gnome.org/Apps/Software; license = licenses.gpl2; - description = "GNOME Software lets you install and update applications and system extensions."; + maintainers = gnome3.maintainers; + platforms = platforms.linux; }; } diff --git a/pkgs/desktops/gnome-3/core/gnome-software/fix-paths.patch b/pkgs/desktops/gnome-3/core/gnome-software/fix-paths.patch new file mode 100644 index 000000000000..239e1781bb1b --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-software/fix-paths.patch @@ -0,0 +1,11 @@ +--- a/src/gs-language.c ++++ b/src/gs-language.c +@@ -95,7 +95,7 @@ + g_autoptr(GMarkupParseContext) context = NULL; + + /* find filename */ +- filename = g_build_filename (DATADIR, "xml", "iso-codes", "iso_639.xml", NULL); ++ filename = g_build_filename ("@isoCodes@", "share", "xml", "iso-codes", "iso_639.xml", NULL); + if (!g_file_test (filename, G_FILE_TEST_EXISTS)) { + g_free (filename); + filename = g_build_filename ("/usr", "share", "xml", "iso-codes", "iso_639.xml", NULL);