about summary refs log tree commit diff
path: root/pkgs/by-name/ep/epub-thumbnailer/package.nix
blob: b1e45ff99b37ee7842207e4f056de28e6e55a72d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, python3
, fetchFromGitHub
, unstableGitUpdater
}:

python3.pkgs.buildPythonApplication {
  pname = "epub-thumbnailer";
  version = "0-unstable-2024-03-16";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "marianosimone";
    repo = "epub-thumbnailer";
    rev = "035c31e9269bcb30dcc20fed31b6dc54e9bfed63";
    hash = "sha256-G/CeYmr+wgJidbavfvIuCbRLJGQzoxAnpo3t4YFJq0c=";
  };

  nativeBuildInputs = with python3.pkgs; [
    setuptools
  ];

  propagatedBuildInputs = with python3.pkgs; [
    pillow
  ];

  postInstall = ''
    mv $out/bin/epub-thumbnailer.py $out/bin/epub-thumbnailer
  '';

  passthru.updateScript = unstableGitUpdater { };

  meta = with lib; {
    description = "Script to extract the cover of an epub book and create a thumbnail for it";
    homepage = "https://github.com/marianosimone/epub-thumbnailer";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ GaetanLepage ];
    mainProgram = "epub-thumbnailer";
  };
}