gnome.nautilus-python: 1.2.3 → 4.0.alpha

Support for Nautilus 43, most scripts will need to be modified to work.

https://gitlab.gnome.org/GNOME/nautilus-python/-/compare/NAUTILUS_PYTHON_1_2_3...4.0.alpha

Changelog-Reviewed-By: Jan Tojnar <jtojnar@gmail.com>
This commit is contained in:
Jan Tojnar
2022-10-11 18:52:17 +02:00
parent a11c29f126
commit 4a06436ff2
@@ -1,30 +1,27 @@
{ stdenv
, lib
, fetchpatch
, substituteAll
, fetchurl
, meson
, ninja
, pkg-config
, which
, autoreconfHook
, gtk-doc
, docbook_xsl
, docbook-xsl-nons
, docbook_xml_dtd_412
, python3
, ncurses
, nautilus
, gtk3
, gnome
}:
stdenv.mkDerivation rec {
pname = "nautilus-python";
version = "1.2.3";
version = "4.0.alpha";
outputs = [ "out" "dev" "doc" ];
outputs = [ "out" "dev" "doc" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "161050sx3sdxqcpjkjcpf6wl4kx0jydihga7mcvrj9c2f8ly0g07";
url = "mirror://gnome/sources/nautilus-python/${lib.versions.majorMinor version}/nautilus-python-${version}.tar.xz";
sha256 = "cuWLpOIZZ0FqIwNV304EaWsKJZ5JHcsFyyp/BFiUmg4=";
};
patches = [
@@ -35,50 +32,27 @@ stdenv.mkDerivation rec {
python3.pkgs.pygobject3
];
})
# Fix build with Nautilus 43.
# https://gitlab.gnome.org/GNOME/nautilus-python/-/merge_requests/9
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/nautilus-python/commit/1691b2eb88c8b9134c6fa06da0858f7b5bb74c72.patch";
sha256 = "dY9KrLorYlGTbKSLObRmffJwJfHwz48kCsInGGByIOI=";
})
];
nativeBuildInputs = [
pkg-config
which
autoreconfHook
meson
ninja
gtk-doc
docbook_xsl
docbook-xsl-nons
docbook_xml_dtd_412
];
buildInputs = [
python3
ncurses # required by python3
python3.pkgs.pygobject3
nautilus
gtk3 # required by libnautilus-extension
];
# Workaround build failure on -fno-common toolchains:
# ld: nautilus-python-object.o:src/nautilus-python.h:61: multiple definition of
# `_PyNautilusMenu_Type'; nautilus-python.o:src/nautilus-python.h:61: first defined here
# TODO: remove it once upstream fixes and releases:
# https://gitlab.gnome.org/GNOME/nautilus-python/-/merge_requests/7
NIX_CFLAGS_COMPILE = "-fcommon";
makeFlags = [
"PYTHON_LIB_LOC=${python3}/lib"
];
PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-4";
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
attrPath = "gnome.${pname}";
versionPolicy = "odd-unstable";
};
};