1{ stdenv
2, lib
3, substituteAll
4, fetchurl
5, meson
6, ninja
7, pkg-config
8, gtk-doc
9, docbook-xsl-nons
10, docbook_xml_dtd_412
11, python3
12, nautilus
13, gnome
14}:
15
16stdenv.mkDerivation rec {
17 pname = "nautilus-python";
18 version = "4.0.1";
19
20 outputs = [ "out" "dev" "doc" "devdoc" ];
21
22 src = fetchurl {
23 url = "mirror://gnome/sources/nautilus-python/${lib.versions.majorMinor version}/nautilus-python-${version}.tar.xz";
24 hash = "sha256-/EnBBPsyoK0ZWmawE2eEzRnRDYs+jVnV7n9z6PlOko8=";
25 };
26
27 patches = [
28 # Make PyGObject’s gi library available.
29 (substituteAll {
30 src = ./fix-paths.patch;
31 pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
32 python3.pkgs.pygobject3
33 ];
34 })
35 ];
36
37 nativeBuildInputs = [
38 pkg-config
39 meson
40 ninja
41 gtk-doc
42 docbook-xsl-nons
43 docbook_xml_dtd_412
44 ];
45
46 buildInputs = [
47 python3
48 python3.pkgs.pygobject3
49 nautilus
50 ];
51
52 passthru = {
53 updateScript = gnome.updateScript {
54 packageName = pname;
55 attrPath = "gnome.${pname}";
56 };
57 };
58
59 meta = with lib; {
60 description = "Python bindings for the Nautilus Extension API";
61 homepage = "https://gitlab.gnome.org/GNOME/nautilus-python";
62 license = licenses.gpl2Plus;
63 maintainers = teams.gnome.members;
64 platforms = platforms.unix;
65 };
66}