From ff953e211e9f05a3c03b2c0ab54b5bbfc876678c Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Wed, 27 Mar 2013 20:12:49 +0100 Subject: [PATCH 1/2] New package: dropbox-cli dropbox-cli, part of dropbox-nautilus is a small self-contained python script to control the dropbox daemon. Signed-off-by: Moritz Ulrich --- .../networking/dropbox-cli/default.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/applications/networking/dropbox-cli/default.nix diff --git a/pkgs/applications/networking/dropbox-cli/default.nix b/pkgs/applications/networking/dropbox-cli/default.nix new file mode 100644 index 000000000000..37e9e06ec5b2 --- /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: 'unix' or even 'all' COULD work too, I'm not sure + platforms = stdenv.lib.platforms.linux; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e72c0fe3d10e..c51462cf6d25 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7750,6 +7750,8 @@ let dropbox = callPackage ../applications/networking/dropbox { }; + dropbox-cli = callPackage ../applications/networking/dropbox-cli { }; + slim = callPackage ../applications/display-managers/slim { }; sndBase = builderDefsPackage (import ../applications/audio/snd) { From f071e856d3fc6ceba10edd12edf81821f864de4d Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Wed, 27 Mar 2013 20:56:46 +0100 Subject: [PATCH 2/2] Fix platform note in dropbox-cli Signed-off-by: Moritz Ulrich --- pkgs/applications/networking/dropbox-cli/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/dropbox-cli/default.nix b/pkgs/applications/networking/dropbox-cli/default.nix index 37e9e06ec5b2..b298b3c9df99 100644 --- a/pkgs/applications/networking/dropbox-cli/default.nix +++ b/pkgs/applications/networking/dropbox-cli/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { homepage = http://dropbox.com; description = "Command line client for the dropbox daemon."; license = stdenv.lib.licenses.gpl3; - # NOTE: 'unix' or even 'all' COULD work too, I'm not sure + # NOTE: Dropbox itself only works on linux, so this is ok. platforms = stdenv.lib.platforms.linux; }; }