2021-12-06 16:07:01 +00:00
|
|
|
|
{ stdenv
|
|
|
|
|
, lib
|
|
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, fetchurl
|
2021-02-05 17:12:51 +00:00
|
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, which
|
|
|
|
|
, gtk-doc
|
|
|
|
|
, docbook_xsl
|
|
|
|
|
, docbook_xml_dtd_412
|
|
|
|
|
, python3
|
|
|
|
|
, ncurses
|
|
|
|
|
, nautilus
|
|
|
|
|
, gtk3
|
2021-05-20 23:08:51 +00:00
|
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "nautilus-python";
|
|
|
|
|
version = "1.2.3";
|
|
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-01-17 00:15:33 +00:00
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
sha256 = "161050sx3sdxqcpjkjcpf6wl4kx0jydihga7mcvrj9c2f8ly0g07";
|
|
|
|
|
};
|
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
patches = [
|
|
|
|
|
# Make PyGObject’s gi library available.
|
|
|
|
|
(substituteAll {
|
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
|
pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
|
|
|
|
|
python3.pkgs.pygobject3
|
|
|
|
|
];
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
|
which
|
|
|
|
|
gtk-doc
|
|
|
|
|
docbook_xsl
|
|
|
|
|
docbook_xml_dtd_412
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
python3
|
|
|
|
|
ncurses # required by python3
|
|
|
|
|
python3.pkgs.pygobject3
|
|
|
|
|
nautilus
|
|
|
|
|
gtk3 # required by libnautilus-extension
|
|
|
|
|
];
|
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
|
# 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";
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
makeFlags = [
|
|
|
|
|
"PYTHON_LIB_LOC=${python3}/lib"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0";
|
|
|
|
|
|
|
|
|
|
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}";
|
|
|
|
|
versionPolicy = "odd-unstable";
|
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 = "Python bindings for the Nautilus Extension API";
|
|
|
|
|
homepage = "https://wiki.gnome.org/Projects/NautilusPython";
|
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
|
platforms = platforms.unix;
|
|
|
|
|
};
|
|
|
|
|
}
|