2021-01-15 13:21:58 +00:00
|
|
|
{ lib, stdenv
|
2019-05-02 12:43:07 +01:00
|
|
|
, substituteAll
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-05-02 12:43:07 +01:00
|
|
|
, fetchurl
|
|
|
|
, python3
|
|
|
|
, dropbox
|
|
|
|
, gtk3
|
2021-05-07 22:18:14 +01:00
|
|
|
, gnome
|
2019-05-22 12:03:39 +01:00
|
|
|
, gdk-pixbuf
|
2019-05-02 12:43:07 +01:00
|
|
|
, gobject-introspection
|
|
|
|
}:
|
|
|
|
|
2014-05-08 15:35:47 +01:00
|
|
|
let
|
2020-03-21 13:00:37 +00:00
|
|
|
version = "2020.03.04";
|
2015-03-22 17:10:28 +00:00
|
|
|
dropboxd = "${dropbox}/bin/dropbox";
|
2014-05-08 15:35:47 +01:00
|
|
|
in
|
2013-03-27 19:12:49 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "dropbox-cli";
|
|
|
|
inherit version;
|
2013-03-27 19:12:49 +00:00
|
|
|
|
2019-05-02 12:43:07 +01:00
|
|
|
outputs = [ "out" "nautilusExtension" ];
|
|
|
|
|
2013-03-27 19:12:49 +00:00
|
|
|
src = fetchurl {
|
2019-01-02 16:06:45 +00:00
|
|
|
url = "https://linux.dropboxstatic.com/packages/nautilus-dropbox-${version}.tar.bz2";
|
2020-03-21 13:00:37 +00:00
|
|
|
sha256 = "1jjc835n2j61d23kvygdb4n4jsrw33r9mbwxrm4fqin6x01l2w7k";
|
2013-03-27 19:12:49 +00:00
|
|
|
};
|
|
|
|
|
2019-05-02 12:43:07 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-cli-paths.patch;
|
|
|
|
inherit dropboxd;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-05-02 12:43:07 +01:00
|
|
|
gobject-introspection
|
2019-05-22 12:03:39 +01:00
|
|
|
gdk-pixbuf
|
2019-05-02 12:43:07 +01:00
|
|
|
# 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-07 22:18:14 +01:00
|
|
|
gnome.nautilus
|
2019-05-02 12:43:07 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
2019-09-03 17:38:57 +01:00
|
|
|
"--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extensions-3.0"
|
2019-05-02 12:43:07 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
2019-09-03 17:38:57 +01:00
|
|
|
"EMBLEM_DIR=${placeholder "nautilusExtension"}/share/nautilus-dropbox/emblems"
|
2019-05-02 12:43:07 +01:00
|
|
|
];
|
2013-06-16 22:38:33 +01:00
|
|
|
|
2013-03-27 19:12:49 +00:00
|
|
|
meta = {
|
2020-03-21 13:00:37 +00:00
|
|
|
homepage = "https://www.dropbox.com";
|
2013-09-26 20:37:49 +01:00
|
|
|
description = "Command line client for the dropbox daemon";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2013-03-27 19:56:46 +00:00
|
|
|
# NOTE: Dropbox itself only works on linux, so this is ok.
|
2021-01-15 13:21:58 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2013-03-27 19:12:49 +00:00
|
|
|
};
|
|
|
|
}
|