diff --git a/pkgs/applications/networking/dropbox-cli/default.nix b/pkgs/applications/networking/dropbox-cli/default.nix new file mode 100644 index 00000000000..b298b3c9df9 --- /dev/null +++ b/pkgs/applications/networking/dropbox-cli/default.nix @@ -0,0 +1,36 @@ +{ stdenv, coreutils, fetchurl, python }: + +stdenv.mkDerivation { + name = "dropbox-cli"; + + src = fetchurl { + url = "https://linux.dropbox.com/packages/dropbox.py"; + sha256 = "1x46i0aplah4a2nqglb8byl3c60w7h1cjja62myxj2dpxyv7fydy"; + }; + + buildInputs = [ coreutils python ]; + + phases = "installPhase fixupPhase"; + + installPhase = '' + mkdir -pv $out/bin/ + cp $src $out/bin/dropbox-cli + ''; + + fixupPhase = '' + substituteInPlace $out/bin/dropbox-cli \ + --replace "/usr/bin/python" ${python}/bin/python \ + --replace "use dropbox help" "use dropbox-cli help" + + chmod +x $out/bin/dropbox-cli + ''; + + meta = { + homepage = http://dropbox.com; + description = "Command line client for the dropbox daemon."; + license = stdenv.lib.licenses.gpl3; + # NOTE: Dropbox itself only works on linux, so this is ok. + platforms = stdenv.lib.platforms.linux; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ce8dbfa043d..28ba9230058 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7746,6 +7746,8 @@ let dropbox = callPackage ../applications/networking/dropbox { }; + dropbox-cli = callPackage ../applications/networking/dropbox-cli { }; + lightdm = callPackage ../applications/display-managers/lightdm { }; lightdm_gtk_greeter = callPackage ../applications/display-managers/lightdm-gtk-greeter { };