summary refs log tree commit diff
path: root/pkgs/tools/networking/s3sync/default.nix
blob: 1ab3e062ca00ce4b961d358458fb02d0e1bd1c66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, fetchurl, ruby, makeWrapper }:

stdenv.mkDerivation {
  name = "s3sync-1.2.6";

  src = fetchurl {
    url = http://s3.amazonaws.com/ServEdge_pub/s3sync/s3sync.tar.gz; # !!!
    sha256 = "19467mgym0da0hifhkcbivccdima7gkaw3k8q760ilfbwgwxcn7f";
  };

  buildInputs = [ makeWrapper ];

  installPhase =
    ''
      mkdir -p $out/libexec/s3sync
      cp *.rb $out/libexec/s3sync
      makeWrapper "${ruby}/bin/ruby $out/libexec/s3sync/s3cmd.rb" $out/bin/s3cmd
      makeWrapper "${ruby}/bin/ruby $out/libexec/s3sync/s3sync.rb" $out/bin/s3sync

      mkdir -p $out/share/doc/s3sync
      cp README* $out/share/doc/s3sync/
    ''; # */

  meta = {
    homepage = http://s3sync.net/;
    description = "Command-line tools to manipulate Amazon S3 buckets";
    license = stdenv.lib.licenses.free; # some custom as-is in file headers
  };
}