diff options
author | Georges Dubus <georges.dubus@compiletoi.net> | 2015-01-14 17:38:26 +0100 |
---|---|---|
committer | Georges Dubus <georges.dubus@compiletoi.net> | 2015-01-14 17:38:47 +0100 |
commit | c64b29497040db23bd9cce7d0b0c76a241853a0f (patch) | |
tree | e029b6238b01beee4df07ffa158f40475c0b6446 | |
parent | 0ab270770bceb681836767d8b09216afb0423b30 (diff) |
fetchFromGitHub: add option for custom name
This is necessary when the rev name contains a "/"
-rw-r--r-- | pkgs/tools/backup/bareos/default.nix | 9 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/tools/backup/bareos/default.nix b/pkgs/tools/backup/bareos/default.nix index 24dfa795f1dd2..87c04954f6bf6 100644 --- a/pkgs/tools/backup/bareos/default.nix +++ b/pkgs/tools/backup/bareos/default.nix @@ -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"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 45a4abd383c75..14160f9b82e75 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; }; |