1{
2 lib,
3 stdenv,
4 fetchurl,
5 replaceVars,
6 pkg-config,
7 gobject-introspection,
8 gdk-pixbuf,
9 caja,
10 gtk3,
11 python3,
12 dropbox,
13 mateUpdateScript,
14}:
15
16let
17 dropboxd = "${dropbox}/bin/dropbox";
18in
19stdenv.mkDerivation rec {
20 pname = "caja-dropbox";
21 version = "1.28.0";
22
23 src = fetchurl {
24 url = "https://pub.mate-desktop.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
25 sha256 = "t0w4qZQlS9PPfLxxK8LsdRagypQqpleFJs29aqYgGWM=";
26 };
27
28 patches = [
29 (replaceVars ./fix-cli-paths.patch {
30 inherit dropboxd;
31 # patch context
32 DESKTOP_FILE_DIR = null;
33 })
34 ];
35
36 strictDeps = true;
37
38 nativeBuildInputs = [
39 pkg-config
40 gobject-introspection
41 gdk-pixbuf
42 (python3.withPackages (
43 ps: with ps; [
44 docutils
45 pygobject3
46 ]
47 ))
48 ];
49
50 buildInputs = [
51 caja
52 gtk3
53 python3
54 ];
55
56 configureFlags = [ "--with-caja-extension-dir=$$out/lib/caja/extensions-2.0" ];
57
58 enableParallelBuilding = true;
59
60 passthru.updateScript = mateUpdateScript { inherit pname; };
61
62 meta = with lib; {
63 description = "Dropbox extension for Caja file manager";
64 homepage = "https://github.com/mate-desktop/caja-dropbox";
65 license = with licenses; [
66 gpl3Plus
67 cc-by-nd-30
68 ];
69 platforms = platforms.unix;
70 teams = [ teams.mate ];
71 };
72}