From b310bb6e6d176f001e0a76026d563f990e194094 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Tue, 20 Jun 2023 09:53:00 -0400 Subject: [PATCH] meta: Replace go-thumbnailer with nixpkgs version Now there is no need for a packages directory since all the packages I maintain are upstreamed. --- assets/go.thumbnailer | 3 --- flake.lock | 17 ++++++++++++++++ flake.nix | 1 + modules/thunar.nix | 1 - packages/go-thumbnailer.nix | 40 ------------------------------------- src/main.nix | 2 ++ 6 files changed, 20 insertions(+), 44 deletions(-) delete mode 100644 assets/go.thumbnailer delete mode 100644 packages/go-thumbnailer.nix diff --git a/assets/go.thumbnailer b/assets/go.thumbnailer deleted file mode 100644 index c105e067..00000000 --- a/assets/go.thumbnailer +++ /dev/null @@ -1,3 +0,0 @@ -[Thumbnailer Entry] -Exec=@out@/bin/go-thumbnailer %s %i %o -MimeType=inode/directory diff --git a/flake.lock b/flake.lock index 69aea02a..3ade206c 100644 --- a/flake.lock +++ b/flake.lock @@ -147,6 +147,22 @@ "type": "github" } }, + "nixpkgs-go-thumbnailer": { + "locked": { + "lastModified": 1687268527, + "narHash": "sha256-ueJuEep01cQHUy9rQRVWDTkfuHU+yUQ5w2Bb69yeCrI=", + "owner": "donovanglover", + "repo": "nixpkgs", + "rev": "72fc3e9404fe2e3c0360619955dbe626974f445e", + "type": "github" + }, + "original": { + "owner": "donovanglover", + "ref": "go-thumbnailer", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-hyprland-autoname-workspaces": { "locked": { "lastModified": 1687166409, @@ -220,6 +236,7 @@ "nix-gaming": "nix-gaming", "nixpkgs": "nixpkgs_2", "nixpkgs-crystalline": "nixpkgs-crystalline", + "nixpkgs-go-thumbnailer": "nixpkgs-go-thumbnailer", "nixpkgs-hyprland-autoname-workspaces": "nixpkgs-hyprland-autoname-workspaces", "nixpkgs-srb2": "nixpkgs-srb2", "stylix": "stylix" diff --git a/flake.nix b/flake.nix index 7d798425..45a74ecd 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ nixpkgs-hyprland-autoname-workspaces.url = "github:donovanglover/nixpkgs/hyprland-autoname-workspaces"; nixpkgs-srb2.url = "github:donovanglover/nixpkgs/srb2"; nixpkgs-crystalline.url = "github:donovanglover/nixpkgs/crystalline"; + nixpkgs-go-thumbnailer.url = "github:donovanglover/nixpkgs/go-thumbnailer"; home-manager = { url = "github:nix-community/home-manager/master"; diff --git a/modules/thunar.nix b/modules/thunar.nix index 302687b3..954b8c0d 100644 --- a/modules/thunar.nix +++ b/modules/thunar.nix @@ -6,7 +6,6 @@ environment.systemPackages = with pkgs; [ xfce.exo # Open with kitty support glib - (pkgs.callPackage ../packages/go-thumbnailer.nix { }) ]; services.gvfs.enable = true; # Trash support diff --git a/packages/go-thumbnailer.nix b/packages/go-thumbnailer.nix deleted file mode 100644 index 9c52f1d6..00000000 --- a/packages/go-thumbnailer.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 - ]; - - vendorSha256 = "sha256-4zgsoExdhEqvycGerNVxZ6LnjeRRO+f6DhJdINR5ZyI="; - - postInstall = '' - mkdir -p $out/share/thumbnailers - substituteAll ${../assets/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/src/main.nix b/src/main.nix index 328c200f..95575dfe 100644 --- a/src/main.nix +++ b/src/main.nix @@ -5,6 +5,7 @@ , nixpkgs-hyprland-autoname-workspaces , nixpkgs-srb2 , nixpkgs-crystalline +, nixpkgs-go-thumbnailer , ... }: @@ -108,6 +109,7 @@ let VARIABLES = import ./variables.nix; in { nixpkgs-hyprland-autoname-workspaces.legacyPackages.${VARIABLES.system}.hyprland-autoname-workspaces nixpkgs-srb2.legacyPackages.${VARIABLES.system}.srb2 nixpkgs-crystalline.legacyPackages.${VARIABLES.system}.crystalline + nixpkgs-go-thumbnailer.legacyPackages.${VARIABLES.system}.go-thumbnailer ]; nixpkgs.config.allowUnfreePredicate = pkg: