fetchFromGitHub: add option for custom name
This is necessary when the rev name contains a "/"
This commit is contained in:
parent
0ab270770b
commit
c64b294970
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchzip, pkgconfig, nettools, gettext, readline, openssl, python
|
{ stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, readline, openssl, python
|
||||||
, ncurses ? null
|
, ncurses ? null
|
||||||
, sqlite ? null, postgresql ? null, mysql ? null, libcap ? null
|
, sqlite ? null, postgresql ? null, mysql ? null, libcap ? null
|
||||||
, zlib ? null, lzo ? null, acl ? null, ceph ? null
|
, zlib ? null, lzo ? null, acl ? null, ceph ? null
|
||||||
|
@ -11,8 +11,11 @@ stdenv.mkDerivation rec {
|
||||||
name = "bareos-${version}";
|
name = "bareos-${version}";
|
||||||
version = "14.2.2";
|
version = "14.2.2";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/bareos/bareos/archive/Release/${version}.tar.gz";
|
owner = "bareos";
|
||||||
|
repo = "bareos";
|
||||||
|
rev = "Release/${version}";
|
||||||
|
name = "${name}-src";
|
||||||
sha256 = "12605jibvj6kdp15s8jpzb9fw1mfm53npf8ib2jfn1r4hvhdrl4j";
|
sha256 = "12605jibvj6kdp15s8jpzb9fw1mfm53npf8ib2jfn1r4hvhdrl4j";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -358,8 +358,8 @@ let
|
||||||
|
|
||||||
fetchzip = import ../build-support/fetchzip { inherit lib fetchurl unzip; };
|
fetchzip = import ../build-support/fetchzip { inherit lib fetchurl unzip; };
|
||||||
|
|
||||||
fetchFromGitHub = { owner, repo, rev, sha256 }: fetchzip {
|
fetchFromGitHub = { owner, repo, rev, sha256, name ? "${repo}-${rev}-src" }: fetchzip {
|
||||||
name = "${repo}-${rev}-src";
|
inherit name;
|
||||||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue