about summary refs log tree commit diff
path: root/humblebundle/fetch-humble-bundle/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'humblebundle/fetch-humble-bundle/default.nix')
-rw-r--r--humblebundle/fetch-humble-bundle/default.nix26
1 files changed, 2 insertions, 24 deletions
diff --git a/humblebundle/fetch-humble-bundle/default.nix b/humblebundle/fetch-humble-bundle/default.nix
index b045d689..fb29cae6 100644
--- a/humblebundle/fetch-humble-bundle/default.nix
+++ b/humblebundle/fetch-humble-bundle/default.nix
@@ -1,7 +1,7 @@
 { stdenv, curl, cacert, writeText, fetchFromGitHub, fetchpatch
 , python, buildPythonPackage, pythonPackages
 
-, email ? null, password ? null
+, email, password
 }:
 
 { machineName, downloadName ? "Download", suffix ? "humblebundle", md5 }: let
@@ -21,28 +21,6 @@
     propagatedBuildInputs = with pythonPackages; [ requests2 ];
   };
 
-  configFilePath = let
-    xdgConfig = builtins.getEnv "XDG_CONFIG_HOME";
-    fallback = "${builtins.getEnv "HOME"}/.config";
-    basedir = if xdgConfig == "" then fallback else xdgConfig;
-  in "${basedir}/nixgames.nix";
-
-  configFile = if !builtins.pathExists configFilePath then throw ''
-    The config file "${configFilePath}" doesn't exist! Be sure to create it and
-    put your HumbleBundle email address and password in it, like this:
-
-    {
-      humblebundle.email = "fancyuser@example.com";
-      humblebundle.password = "my_super_secret_password";
-    }
-  '' else configFilePath;
-
-  credentials = if email != null && password != null then {
-    inherit email password;
-  } else {
-    inherit ((import configFile).humblebundle) email password;
-  };
-
   getDownloadURL = writeText "gethburl.py" ''
     import sys, humblebundle
 
@@ -72,7 +50,7 @@
           raise SystemExit(1)
 
     hb = humblebundle.HumbleApi()
-    hb.login('${credentials.email}', '${credentials.password}')
+    hb.login('${email}', '${password}')
     products = dict(get_products(hb))
     dstruct = find_download(products)