From cc166be63f47195559c0922980fc40af4e3c5510 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Mon, 14 Aug 2023 19:39:46 -0400 Subject: [PATCH] thud: rename from go-thumbnailer, 0.1.0 -> 0.3.0 --- .../misc/go-thumbnailer/default.nix | 40 ----------------- .../misc/go-thumbnailer/go.thumbnailer | 3 -- pkgs/by-name/th/thud/package.nix | 43 +++++++++++++++++++ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 5 files changed, 44 insertions(+), 45 deletions(-) delete mode 100644 pkgs/applications/misc/go-thumbnailer/default.nix delete mode 100644 pkgs/applications/misc/go-thumbnailer/go.thumbnailer create mode 100644 pkgs/by-name/th/thud/package.nix diff --git a/pkgs/applications/misc/go-thumbnailer/default.nix b/pkgs/applications/misc/go-thumbnailer/default.nix deleted file mode 100644 index 9dd571735e62..000000000000 --- a/pkgs/applications/misc/go-thumbnailer/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ 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 - ]; - - vendorHash = "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 deleted file mode 100644 index c105e0674d19..000000000000 --- a/pkgs/applications/misc/go-thumbnailer/go.thumbnailer +++ /dev/null @@ -1,3 +0,0 @@ -[Thumbnailer Entry] -Exec=@out@/bin/go-thumbnailer %s %i %o -MimeType=inode/directory diff --git a/pkgs/by-name/th/thud/package.nix b/pkgs/by-name/th/thud/package.nix new file mode 100644 index 000000000000..f007174df860 --- /dev/null +++ b/pkgs/by-name/th/thud/package.nix @@ -0,0 +1,43 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +}: + +rustPlatform.buildRustPackage rec { + pname = "thud"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "donovanglover"; + repo = "thud"; + rev = version; + hash = "sha256-3MxmVKs0huXPnL9mqDniaIarkAvJmwSOMii2ntXtOos="; + }; + + cargoHash = "sha256-Hk3HlcA253FAA9hw5p9W+Mvec84zLo7bEmM2/BbmjiM="; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + install -Dm644 assets/thud.thumbnailer $out/share/thumbnailers/thud.thumbnailer + substituteInPlace $out/share/thumbnailers/thud.thumbnailer --replace "thud" "$out/bin/thud" + + installManPage man/thud.1 + + installShellCompletion --cmd thud \ + --bash <(cat completions/thud.bash) \ + --fish <(cat completions/thud.fish) \ + --zsh <(cat completions/_thud) + ''; + + meta = with lib; { + description = "Generate directory thumbnails for GTK-based file browsers from images inside them"; + homepage = "https://github.com/donovanglover/thud"; + license = licenses.mit; + maintainers = with maintainers; [ donovanglover ]; + mainProgram = "thud"; + }; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 85c66e4bbbbf..e1e6b2c0ac0c 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -682,6 +682,7 @@ mapAliases ({ go-mk = throw "go-mk has been dropped due to the lack of maintenance from upstream since 2015"; # Added 2022-06-02 go-pup = throw "'go-pup' has been renamed to/replaced by 'pup'"; # Converted to throw 2022-02-22 go-repo-root = throw "go-repo-root has been dropped due to the lack of maintenance from upstream since 2014"; # Added 2022-06-02 + go-thumbnailer = thud; # Added 2023-09-21 gometer = throw "gometer has been removed from nixpkgs because goLance stopped offering Linux support"; # Added 2023-02-10 gpgstats = throw "gpgstats has been removed: upstream is gone"; # Added 2022-02-06 gpshell = throw "gpshell has been removed, because it was unmaintained in nixpkgs"; # added 2021-12-17 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 53d44fd385e0..7a04e071dda7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5503,8 +5503,6 @@ with pkgs; go-neb = callPackage ../applications/networking/instant-messengers/go-neb { }; - go-thumbnailer = callPackage ../applications/misc/go-thumbnailer { }; - google-cursor = callPackage ../data/icons/google-cursor { }; geckodriver = callPackage ../development/tools/geckodriver {