nixpkgs/pkgs/applications/networking/dropbox/cli.nix

71 lines
1.5 KiB
Nix
Raw Normal View History

2021-01-15 13:21:58 +00:00
{ lib, stdenv
, substituteAll
, pkg-config
, fetchurl
, python3
, dropbox
, gtk3
, gnome
2019-05-22 12:03:39 +01:00
, gdk-pixbuf
, gobject-introspection
}:
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";
in
stdenv.mkDerivation {
2019-08-13 22:52:01 +01:00
pname = "dropbox-cli";
inherit version;
outputs = [ "out" "nautilusExtension" ];
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";
};
strictDeps = true;
patches = [
(substituteAll {
src = ./fix-cli-paths.patch;
inherit dropboxd;
})
];
nativeBuildInputs = [
pkg-config
gobject-introspection
2019-05-22 12:03:39 +01:00
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
gnome.nautilus
];
configureFlags = [
"--with-nautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extensions-3.0"
];
makeFlags = [
"EMBLEM_DIR=${placeholder "nautilusExtension"}/share/nautilus-dropbox/emblems"
];
meta = {
2020-03-21 13:00:37 +00:00
homepage = "https://www.dropbox.com";
description = "Command line client for the dropbox daemon";
2021-01-15 13:21:58 +00:00
license = lib.licenses.gpl3Plus;
# NOTE: Dropbox itself only works on linux, so this is ok.
2021-01-15 13:21:58 +00:00
platforms = lib.platforms.linux;
};
}