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
|
2023-11-16 04:20:00 +00:00
|
|
|
, gtk4
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, gdk-pixbuf
|
|
|
|
, gobject-introspection
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2024.04.17";
|
2020-04-24 23:36:52 +00:00
|
|
|
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";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-pqCYzxaqR0f0CBaseT1Z436K47cIDQswYR1sK4Zj8sE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(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
|
2023-11-16 04:20:00 +00:00
|
|
|
gtk4
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.nautilus
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
2023-11-16 04:20:00 +00:00
|
|
|
"--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extension-4"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "dropbox";
|
|
|
|
maintainers = with lib.maintainers; [ eclairevoyant ];
|
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
|
|
|
};
|
|
|
|
}
|