Unverified Commit 70123e09 authored by Donovan Glover's avatar Donovan Glover
Browse files

icoextract: use thumbnailer from upstream

Fixes an issue where upstream updated the thumbnailer by fetching from
GitHub instead of PyPI.
parent a4630ce4
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
[Thumbnailer Entry]
Exec=@out@/bin/exe-thumbnailer -v -s %s %i %o
MimeType=application/x-ms-dos-executable;application/x-dosexec;application/x-msdownload
+10 −7
Original line number Diff line number Diff line
{
  lib,
  python3Packages,
  fetchPypi,
  fetchFromGitHub,
}:

python3Packages.buildPythonApplication rec {
@@ -9,10 +9,11 @@ python3Packages.buildPythonApplication rec {
  version = "0.1.5";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    extension = "tar.gz";
    hash = "sha256-/UxnWNyRNtwI4Rxx97i5QyjeMrUr5Sq+TfLTmU0xWyc=";
  src = fetchFromGitHub {
    owner = "jlu5";
    repo = "icoextract";
    rev = version;
    hash = "sha256-McVG8966NCEpzc9biawLvUgbQUtterkIud/9GwOeltI=";
  };

  build-system = with python3Packages; [ setuptools ];
@@ -28,8 +29,10 @@ python3Packages.buildPythonApplication rec {
  pythonImportsCheck = [ "icoextract" ];

  postInstall = ''
    mkdir -p $out/share/thumbnailers
    substituteAll ${./exe-thumbnailer.thumbnailer} $out/share/thumbnailers/exe-thumbnailer.thumbnailer
    substituteInPlace exe-thumbnailer.thumbnailer \
      --replace Exec=exe-thumbnailer Exec=$out/bin/exe-thumbnailer

    install -Dm644 exe-thumbnailer.thumbnailer $out/share/thumbnailers
  '';

  meta = with lib; {