From f58364c9f0f81e8e7d86e6dd6005bbdca15298dd Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Tue, 20 Jun 2023 09:42:07 -0400 Subject: [PATCH] go-thumbnailer: init at 0.1.0 --- .../misc/go-thumbnailer/default.nix | 40 +++++++++++++++++++ .../misc/go-thumbnailer/go.thumbnailer | 3 ++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 45 insertions(+) create mode 100644 pkgs/applications/misc/go-thumbnailer/default.nix create mode 100644 pkgs/applications/misc/go-thumbnailer/go.thumbnailer diff --git a/pkgs/applications/misc/go-thumbnailer/default.nix b/pkgs/applications/misc/go-thumbnailer/default.nix new file mode 100644 index 000000000000..99a8f5a510c0 --- /dev/null +++ b/pkgs/applications/misc/go-thumbnailer/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, pkg-config +, vips +}: + +buildGoModule rec { + pname = "go-thumbnailer"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "donovanglover"; + repo = pname; + rev = version; + sha256 = "sha256-sgd5kNnDXcSesGT+OignZ+APjNSxSP0Z60dr8cWO6sU="; + }; + + buildInputs = [ + vips + ]; + + nativeBuildInputs = [ + pkg-config + ]; + + vendorSha256 = "sha256-4zgsoExdhEqvycGerNVxZ6LnjeRRO+f6DhJdINR5ZyI="; + + postInstall = '' + mkdir -p $out/share/thumbnailers + substituteAll ${./go.thumbnailer} $out/share/thumbnailers/go.thumbnailer + ''; + + meta = with lib; { + description = "A cover thumbnailer written in Go for performance and reliability"; + homepage = "https://github.com/donovanglover/go-thumbnailer"; + license = licenses.mit; + maintainers = with maintainers; [ donovanglover ]; + }; +} diff --git a/pkgs/applications/misc/go-thumbnailer/go.thumbnailer b/pkgs/applications/misc/go-thumbnailer/go.thumbnailer new file mode 100644 index 000000000000..c105e0674d19 --- /dev/null +++ b/pkgs/applications/misc/go-thumbnailer/go.thumbnailer @@ -0,0 +1,3 @@ +[Thumbnailer Entry] +Exec=@out@/bin/go-thumbnailer %s %i %o +MimeType=inode/directory diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5282d4968775..e7bb42e9a858 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5163,6 +5163,8 @@ with pkgs; go-neb = callPackage ../applications/networking/instant-messengers/go-neb { }; + go-thumbnailer = callPackage ../applications/misc/go-thumbnailer { }; + geckodriver = callPackage ../development/tools/geckodriver { inherit (darwin.apple_sdk.frameworks) Security; };