summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-repo/default.nix
blob: a697aaa08a1ae9a11eee63b097785ac9e96f75d5 (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
{ stdenv, fetchurl, python }:

stdenv.mkDerivation {
  name = "git-repo-1.21";
  src = fetchurl {
    # I could not find a versioned url for the 1.21 version. In case
    # the sha mismatches, check the homepage for new version and sha.
    url = "http://commondatastorage.googleapis.com/git-repo-downloads/repo";
    sha1 = "b8bd1804f432ecf1bab730949c82b93b0fc5fede";
  };

  unpackPhase = "true";
  installPhase = ''
    mkdir -p $out/bin
    sed -e 's,!/usr/bin/env python,!${python}/bin/python,' < $src > $out/bin/repo
    chmod +x $out/bin/repo
  '';

  meta = {
    homepage = "http://source.android.com/source/downloading.html";
    description = "Android's repo management tool";
  };
}