2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, substituteAll
|
2022-10-21 18:38:19 +00:00
|
|
|
, autoreconfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, python3
|
|
|
|
, dropbox
|
|
|
|
, gtk3
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, gdk-pixbuf
|
|
|
|
, gobject-introspection
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "2020.03.04";
|
|
|
|
dropboxd = "${dropbox}/bin/dropbox";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "dropbox-cli";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
outputs = [ "out" "nautilusExtension" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
2022-09-09 14:08:57 +00:00
|
|
|
url = "https://linux.dropbox.com/packages/nautilus-dropbox-${version}.tar.bz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1jjc835n2j61d23kvygdb4n4jsrw33r9mbwxrm4fqin6x01l2w7k";
|
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
patches = [
|
2022-10-21 18:38:19 +00:00
|
|
|
# Fix extension for Nautilus 43
|
|
|
|
# https://github.com/dropbox/nautilus-dropbox/pull/105
|
|
|
|
./nautilus-43.patch
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-cli-paths.patch;
|
|
|
|
inherit dropboxd;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
autoreconfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
gobject-introspection
|
|
|
|
gdk-pixbuf
|
|
|
|
# only for build, the install command also wants to use GTK through introspection
|
|
|
|
# but we are using Nix for installation so we will not need that.
|
|
|
|
(python3.withPackages (ps: with ps; [
|
|
|
|
docutils
|
|
|
|
pygobject3
|
|
|
|
]))
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
python3
|
|
|
|
gtk3
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.nautilus
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extensions-3.0"
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"EMBLEM_DIR=${placeholder "nautilusExtension"}/share/nautilus-dropbox/emblems"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.dropbox.com";
|
|
|
|
description = "Command line client for the dropbox daemon";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
# NOTE: Dropbox itself only works on linux, so this is ok.
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|