Add a utility function "fetchGitHub"

This is a small wrapper around fetchzip. It allows you to say:

  src = fetchGitHub {
    owner = "NixOS";
    repo = "nix";
    rev = "924e19341a5ee488634bc9ce1ea9758ac496afc3"; # or a tag
    sha256 = "1ld1jc26wy0smkg63chvdzsppfw6zy1ykf3mmc50hkx397wcbl09";
  };
This commit is contained in:
Eelco Dolstra
2014-05-08 15:30:18 +02:00
parent c8df888858
commit ebd8573046
3 changed files with 16 additions and 8 deletions
+5 -3
View File
@@ -1,12 +1,14 @@
{ stdenv, fetchzip, python, pythonPackages, sysstat, unzip, tornado
{ stdenv, fetchGitHub, python, pythonPackages, sysstat, unzip, tornado
, makeWrapper }:
stdenv.mkDerivation rec {
version = "4.2.1";
name = "dd-agent-${version}";
src = fetchzip {
url = "https://github.com/DataDog/dd-agent/archive/${version}.zip";
src = fetchGitHub {
owner = "DataDog";
repo = "dd-agent";
rev = version;
sha256 = "06f9nkvnpfzs2nw75cac2y9wnp2bay4sg94zz0wjm8886rigjjjm";
};