2021-01-15 13:21:58 +00:00
|
|
|
{ lib, stdenv
|
2019-05-02 11:43:07 +00:00
|
|
|
, substituteAll
|
2022-09-23 22:40:36 +00:00
|
|
|
, autoreconfHook
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-05-02 11:43:07 +00:00
|
|
|
, fetchurl
|
|
|
|
, python3
|
|
|
|
, dropbox
|
2023-10-20 04:34:30 +00:00
|
|
|
, gtk4
|
2024-06-13 09:13:18 +00:00
|
|
|
, nautilus
|
2019-05-22 11:03:39 +00:00
|
|
|
, gdk-pixbuf
|
2019-05-02 11:43:07 +00:00
|
|
|
, gobject-introspection
|
|
|
|
}:
|
|
|
|
|
2014-05-08 14:35:47 +00:00
|
|
|
let
|
2024-04-29 06:04:59 +00:00
|
|
|
version = "2024.04.17";
|
2015-03-22 17:10:28 +00:00
|
|
|
dropboxd = "${dropbox}/bin/dropbox";
|
2014-05-08 14:35:47 +00:00
|
|
|
in
|
2013-03-27 19:12:49 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "dropbox-cli";
|
|
|
|
inherit version;
|
2013-03-27 19:12:49 +00:00
|
|
|
|
2019-05-02 11:43:07 +00:00
|
|
|
outputs = [ "out" "nautilusExtension" ];
|
|
|
|
|
2013-03-27 19:12:49 +00:00
|
|
|
src = fetchurl {
|
2022-08-25 14:22:26 +00:00
|
|
|
url = "https://linux.dropbox.com/packages/nautilus-dropbox-${version}.tar.bz2";
|
2024-04-29 06:04:59 +00:00
|
|
|
hash = "sha256-pqCYzxaqR0f0CBaseT1Z436K47cIDQswYR1sK4Zj8sE=";
|
2013-03-27 19:12:49 +00:00
|
|
|
};
|
|
|
|
|
2019-05-02 11:43:07 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-cli-paths.patch;
|
|
|
|
inherit dropboxd;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-09-23 22:40:36 +00:00
|
|
|
autoreconfHook
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-05-02 11:43:07 +00:00
|
|
|
gobject-introspection
|
2019-05-22 11:03:39 +00:00
|
|
|
gdk-pixbuf
|
2019-05-02 11:43:07 +00: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
|
2023-10-20 04:34:30 +00:00
|
|
|
gtk4
|
2024-06-13 09:13:18 +00:00
|
|
|
nautilus
|
2019-05-02 11:43:07 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
2023-10-20 04:34:30 +00:00
|
|
|
"--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extension-4"
|
2019-05-02 11:43:07 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
2019-09-03 16:38:57 +00:00
|
|
|
"EMBLEM_DIR=${placeholder "nautilusExtension"}/share/nautilus-dropbox/emblems"
|
2019-05-02 11:43:07 +00:00
|
|
|
];
|
2013-06-16 21:38:33 +00: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 19:37:49 +00:00
|
|
|
description = "Command line client for the dropbox daemon";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2023-10-20 04:34:56 +00:00
|
|
|
mainProgram = "dropbox";
|
2024-09-10 19:02:41 +00:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
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
|
|
|
};
|
|
|
|
}
|