From 1d41d38480fed47d26d8a0a384546ba8182aa11a Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Tue, 14 Jul 2015 17:26:34 +0200 Subject: fecthHumbleBundle: Allow to provide real file name By overriding the real file name, it is possible to prefetch the game archive with `nix-prefetch-url --type md5 file:///realname`. --- humblebundle/fetch-humble-bundle/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/humblebundle/fetch-humble-bundle/default.nix b/humblebundle/fetch-humble-bundle/default.nix index fb29cae6..3e0bc5ad 100644 --- a/humblebundle/fetch-humble-bundle/default.nix +++ b/humblebundle/fetch-humble-bundle/default.nix @@ -4,8 +4,8 @@ , email, password }: -{ machineName, downloadName ? "Download", suffix ? "humblebundle", md5 }: let - cafile = "${cacert}/etc/ca-bundle.crt"; +{ name ? null, machineName, downloadName ? "Download", suffix ? "humblebundle", md5 }: let + cafile = "${cacert}/etc/ssl/certs/ca-bundle.crt"; humbleAPI = buildPythonPackage rec { name = "humblebundle-${version}"; @@ -69,7 +69,7 @@ print dstruct.url.web ''; in stdenv.mkDerivation { - name = "${machineName}.${suffix}"; + name = if name != null then name else "${machineName}.${suffix}"; outputHashAlgo = "md5"; outputHash = md5; -- cgit 1.4.1