summaryrefslogtreecommitdiff
path: root/wrappers/gallery-dl/default.nix
blob: 1c640f8a873d7bd0848cb13e60296e96000b950d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ pkgs, ... }:
let
  jsonFormat = pkgs.formats.json { };
  config = (import ./config.nix);
  jsonConfig = jsonFormat.generate "gallery-dl-config" config;
in
{
  wrappers.gallery-dl = {
    basePackage = pkgs.gallery-dl;
    prependFlags = [
      "--config"
      jsonConfig
      "--option"
      # NOTE: escape the $ here because makeCWrapper otherwise expands it,
      # evaluating to `/homeless-shelter`
      "base-directory=\\$HOME/Pictures/gallery-dl" # TODO: maybe mandate XDG
    ];
  };
}