Merge pull request #5770 from madjar/master

fetchFromGitHub: add option for custom name
This commit is contained in:
Eelco Dolstra 2015-01-14 19:21:15 +01:00
commit 1b34559ff5
2 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip, pkgconfig, nettools, gettext, readline, openssl, python
{ stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, readline, openssl, python
, ncurses ? null
, sqlite ? null, postgresql ? null, mysql ? null, libcap ? null
, zlib ? null, lzo ? null, acl ? null, ceph ? null
@ -11,8 +11,11 @@ stdenv.mkDerivation rec {
name = "bareos-${version}";
version = "14.2.2";
src = fetchzip {
url = "https://github.com/bareos/bareos/archive/Release/${version}.tar.gz";
src = fetchFromGitHub {
owner = "bareos";
repo = "bareos";
rev = "Release/${version}";
name = "${name}-src";
sha256 = "12605jibvj6kdp15s8jpzb9fw1mfm53npf8ib2jfn1r4hvhdrl4j";
};

View File

@ -358,8 +358,8 @@ let
fetchzip = import ../build-support/fetchzip { inherit lib fetchurl unzip; };
fetchFromGitHub = { owner, repo, rev, sha256 }: fetchzip {
name = "${repo}-${rev}-src";
fetchFromGitHub = { owner, repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip {
inherit name;
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
inherit sha256;
};