2014-05-08 16:35:47 +02:00
|
|
|
{ stdenv, pkgconfig, fetchurl, python, dropbox }:
|
|
|
|
let
|
|
|
|
version = "1.6.2";
|
|
|
|
in
|
2013-03-27 20:12:49 +01:00
|
|
|
stdenv.mkDerivation {
|
2014-05-08 16:35:47 +02:00
|
|
|
name = "dropbox-cli-${version}";
|
2013-03-27 20:12:49 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-05-08 16:35:47 +02:00
|
|
|
url = "https://linux.dropbox.com/packages/nautilus-dropbox-${version}.tar.bz2";
|
|
|
|
sha256 = "1r1kqvnf5a0skby6rr8bmxg128z97fz4gb1n7zlc1vyhqw4k3mb3";
|
2013-03-27 20:12:49 +01:00
|
|
|
};
|
|
|
|
|
2014-05-08 16:35:47 +02:00
|
|
|
buildInputs = [ pkgconfig python ];
|
2013-03-27 20:12:49 +01:00
|
|
|
|
2014-05-08 16:35:47 +02:00
|
|
|
phases = "unpackPhase installPhase";
|
2013-06-16 23:38:33 +02:00
|
|
|
|
2013-03-27 20:12:49 +01:00
|
|
|
installPhase = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p "$out/bin/" "$out/share/applications"
|
2014-05-08 16:35:47 +02:00
|
|
|
cp data/dropbox.desktop "$out/share/applications"
|
|
|
|
substitute "dropbox.in" "$out/bin/dropbox" \
|
|
|
|
--replace '@PACKAGE_VERSION@' ${version} \
|
|
|
|
--replace '@DESKTOP_FILE_DIR@' "$out/share/applications" \
|
|
|
|
--replace '@IMAGEDATA16@' '"too-lazy-to-fix"' \
|
|
|
|
--replace '@IMAGEDATA64@' '"too-lazy-to-fix"'
|
|
|
|
|
|
|
|
chmod +x "$out/bin/"*
|
|
|
|
patchShebangs "$out/bin"
|
2013-03-27 20:12:49 +01:00
|
|
|
'';
|
2013-06-16 23:38:33 +02:00
|
|
|
|
2013-03-27 20:12:49 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://dropbox.com;
|
2013-09-26 21:37:49 +02:00
|
|
|
description = "Command line client for the dropbox daemon";
|
2013-03-27 20:12:49 +01:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2013-06-16 23:40:43 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
2013-03-27 20:56:46 +01:00
|
|
|
# NOTE: Dropbox itself only works on linux, so this is ok.
|
2013-03-27 20:12:49 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|