# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0

{ depot, pkgs, ... }@args: {
  bazel-run = import ./bazel-run.nix args;
  crane = import ./crane.nix args;
  javaws-env = import ./javaws-env.nix args;
  plex-pass = import ./plex-pass.nix args;
  secretsync = import ./secretsync args;
  copybara = import ./copybara.nix args;
  hg-git = import ./hg-git.nix args;
  erbium = import ./erbium args;
  python-emv = import ./python-emv.nix args;
  sheepshaver = import ./sheepshaver.nix args;
  intermec-cups-driver = pkgs.callPackage ./intermec-cups-driver.nix {};
  deluge = import ./deluge args;
  grafana-plugins = import ./grafana-plugins args;
  unifiHacked = import ./unifi-hack args;
  tiny-remapper = import ./tiny-remapper.nix args;
  django-allauth = pkgs.python3Packages.callPackage ./django-allauth.nix {};
  django-tailwind = pkgs.python3Packages.callPackage ./django-tailwind.nix {};
  windows = import ./windows args;
  hp-rom = import ./hp-rom.nix args;
  enigma = import ./enigma.nix args;
  alertmanager-discord = pkgs.callPackage ./alertmanager-discord.nix {};
  prometheus-snmp-config = import ./prometheus-snmp-config args;
  flameshot = pkgs.libsForQt5.callPackage ./flameshot {};
  lukegb-wallpapers = pkgs.callPackage ./lukegb-wallpapers {};
  rundeck-bin = pkgs.callPackage ./rundeck-bin {};
  mercurial = pkgs.mercurialFull.withExtensions (pm: with pm; [
    hg-evolve
  ]);
  netbox = pkgs.python3Packages.callPackage ./netbox {};
  prometheus-bird-exporter-lfty = pkgs.callPackage ./prometheus-bird-exporter-lfty.nix {};
  eapol-test = pkgs.callPackage ./eapol-test.nix {};
  datez = pkgs.callPackage ./datez {
    rustPlatform = depot.pkgs.nightlyRustPlatform;
  };

  nixpkgs-mozilla = pkgs.callPackages ./nixpkgs-mozilla {};
  nightlyRust = depot.pkgs.nixpkgs-mozilla.rustChannelOf {
    date = "2021-11-20";
    channel = "nightly";
    sha256 = "sha256:121f91ghml2dpvlqb0r7bk7gqgbjj5a1zv66zk0samnyq8zqp7h6";
  };
  nightlyRustPlatform = pkgs.makeRustPlatform {
    rustc = depot.pkgs.nightlyRust.rust;
    inherit (depot.pkgs.nightlyRust) cargo;
  };

  gimp-plugin-vtf = pkgs.callPackage ./gimp-plugin-vtf {};

  kitty-themes = pkgs.fetchFromGitHub {
    owner = "kovidgoyal";
    repo = "kitty-themes";
    rev = "702dbae791c9c0812c8fc4a7ee85c99dadc0dc3d";
    sha256 = "18miswrdy3j2y59alqcw44pc2iv3kmsx7qmvak81z5bkmj2hjrss";
  };

  baserow-oss = pkgs.callPackages ./baserow { ossOnly = true; };
  baserow = pkgs.callPackages ./baserow { ossOnly = false; };

  common-updater-scripts = pkgs.common-updater-scripts.override {
    nix = pkgs.nix_2_3;
  };
  lutris = pkgs.lutris.override {
    extraPkgs = pkgs: with pkgs; [ openssl gnome.zenity ];
  };
  vault-acme = pkgs.callPackage ./vault-acme { };
} // (import ./heptapod-runner args)
  // (import ./lightspeed args)