summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
blob: aef86c06cfb73e370259cbaf905c0543799a1300 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{ stdenv, ghc, fetchurl, perl, coreutils, git, libuuid, rsync
, findutils, curl, ikiwiki, which, openssh
, blazeBuilder, blazeHtml, bloomfilter, caseInsensitive
, clientsession, cryptoApi, dataDefault, dataenc, dbus
, editDistance, extensibleExceptions, filepath, hamlet, hinotify
, hS3, hslogger, HTTP, httpTypes, IfElse, json, liftedBase
, MissingH, monadControl, mtl, network, networkInfo
, networkMulticast, pcreLight, QuickCheck, SHA, stm, text, time
, transformers, transformersBase, utf8String, wai, waiLogger, warp
, yesod, yesodDefault, yesodStatic, testpack, SafeSemaphore
, networkPprotocolXmpp, async, dns, DAV
}:

let
  version = "3.20130107";
in
stdenv.mkDerivation {
  name = "git-annex-${version}";

  src = fetchurl {
    url = "http://git.kitenet.net/?p=git-annex.git;a=snapshot;sf=tgz;h=${version}";
    sha256 = "15x4rmpxv3mgp8r4gb6jana5262nvyl6rm5p8slc5z5ijl0qwbzq";
    name = "git-annex-${version}.tar.gz";
  };

  buildInputs = [ ghc git libuuid rsync findutils curl ikiwiki which
    openssh blazeBuilder blazeHtml bloomfilter caseInsensitive
    clientsession cryptoApi dataDefault dataenc dbus editDistance
    extensibleExceptions filepath hamlet hinotify hS3 hslogger HTTP
    httpTypes IfElse json liftedBase MissingH monadControl mtl network
    networkInfo networkMulticast pcreLight QuickCheck SHA stm text time
    transformers transformersBase utf8String wai waiLogger warp yesod
    yesodDefault yesodStatic testpack SafeSemaphore networkPprotocolXmpp
    async dns DAV ];

  checkTarget = "test";
  doCheck = true;

  preConfigure = ''
    makeFlagsArray=( PREFIX=$out )
    sed -i -e 's|#!/usr/bin/perl|#!${perl}/bin/perl|' Build/mdwn2man
    sed -i -e 's|"cp |"${coreutils}/bin/cp |' -e 's|"rm -f |"${coreutils}/bin/rm -f |' test.hs
    # Remove this patch after the next update!
    sed -i -e '9i #define WITH_OLD_URI' Utility/Url.hs
  '';

  meta = {
    homepage = "http://git-annex.branchable.com/";
    description = "Manage files with git without checking them into git";
    license = stdenv.lib.licenses.gpl3Plus;

    longDescription = ''
      Git-annex allows managing files with git, without checking the
      file contents into git. While that may seem paradoxical, it is
      useful when dealing with files larger than git can currently
      easily handle, whether due to limitations in memory, checksumming
      time, or disk space.

      Even without file content tracking, being able to manage files
      with git, move files around and delete files with versioned
      directory trees, and use branches and distributed clones, are all
      very handy reasons to use git. And annexed files can co-exist in
      the same git repository with regularly versioned files, which is
      convenient for maintaining documents, Makefiles, etc that are
      associated with annexed files but that benefit from full revision
      control.
    '';

    platforms = ghc.meta.platforms;
    maintainers = [ stdenv.lib.maintainers.simons ];
  };
}