about summary refs log tree commit diff
path: root/pkgs/games/itch/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-08-25 22:35:28 +0200
committeraszlig <aszlig@redmoonstudios.org>2017-08-25 22:35:28 +0200
commit490b4b47733a25dd953fc4d3326294c65a35b1e4 (patch)
treef31d71a7055c927b81e196551d2ff7d803957575 /pkgs/games/itch/default.nix
parentcab045f4f50a3e80eedbdf8953e10cd53f029b43 (diff)
pkgs/games: Add Invisigun Heroes
This introduces support for fetching games from itch.io, because the
Humble Bundle version unfortunately only provides a Steam key and we
obviously don't want that.

I only played two levels, but so far it works as intended.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/games/itch/default.nix')
-rw-r--r--pkgs/games/itch/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/games/itch/default.nix b/pkgs/games/itch/default.nix
new file mode 100644
index 00000000..34ffc6ed
--- /dev/null
+++ b/pkgs/games/itch/default.nix
@@ -0,0 +1,28 @@
+{ config, lib, pkgs, ... }:
+
+let
+  cfg = config.itch;
+
+  self = rec {
+    callPackage = pkgs.lib.callPackageWith (pkgs // self);
+    callPackage_i686 = pkgs.lib.callPackageWith (pkgs.pkgsi686Linux // self);
+
+    fetchItch = callPackage ./fetch-itch {
+      inherit (config.itch) apiKey;
+    };
+
+    invisigun-heroes = callPackage ./invisigun-heroes.nix {};
+  };
+in {
+  options.itch.apiKey = lib.mkOption {
+    type = lib.types.nullOr lib.types.str;
+    default = null;
+    description = ''
+      The API key of your <link xlink:href="https://itch.io/">itch.io</link>
+      account, can be retrieved by heading to <link
+      xlink:href="https://itch.io/user/settings/api-keys"/>.
+    '';
+  };
+
+  config.packages.itch = lib.mkIf (cfg.apiKey != null) self;
+}