From 8a085eb56fd0051a65a5b08a5e9fd7669635cd74 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 25 Mar 2024 00:50:23 +0100 Subject: [PATCH] epub-thumbnailer: init at unstable-2024-03-16 --- pkgs/by-name/ep/epub-thumbnailer/package.nix | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/by-name/ep/epub-thumbnailer/package.nix diff --git a/pkgs/by-name/ep/epub-thumbnailer/package.nix b/pkgs/by-name/ep/epub-thumbnailer/package.nix new file mode 100644 index 000000000000..b1e45ff99b37 --- /dev/null +++ b/pkgs/by-name/ep/epub-thumbnailer/package.nix @@ -0,0 +1,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"; + }; +}