about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Maudoux <layus.on@gmail.com>2015-07-14 17:26:34 +0200
committerGuillaume Maudoux <layus.on@gmail.com>2015-07-14 17:30:00 +0200
commit1d41d38480fed47d26d8a0a384546ba8182aa11a (patch)
treed6641282bb8bf801c3b51bc67abe4fa84a200884
parent62d2888f937bbea915463da55db520710fb5e3fb (diff)
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://<path>/realname`.
-rw-r--r--humblebundle/fetch-humble-bundle/default.nix6
1 files 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;