From aef160eb96b624d9926c9d9abc694b46c16cfbfc Mon Sep 17 00:00:00 2001 From: Oleksii Filonenko Date: Mon, 22 Jun 2026 17:58:09 +0100 Subject: [PATCH 1/2] trex: init at 2.0.0 --- pkgs/by-name/tr/trex/package.nix | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pkgs/by-name/tr/trex/package.nix diff --git a/pkgs/by-name/tr/trex/package.nix b/pkgs/by-name/tr/trex/package.nix new file mode 100644 index 000000000000..97f49654e1d6 --- /dev/null +++ b/pkgs/by-name/tr/trex/package.nix @@ -0,0 +1,41 @@ +{ + lib, + stdenvNoCC, + fetchurl, + nix-update-script, + unzip, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "trex"; + version = "2.0.0"; + + src = fetchurl { + url = "https://github.com/amebalabs/TRex/releases/download/v${finalAttrs.version}/TRex-${finalAttrs.version}.zip"; + hash = "sha256-To3vxoDapuCcstq6V2qiQ2g8d1uTqVEM5fElRNIi3k0="; + }; + + sourceRoot = "."; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/Applications + cp -r *.app $out/Applications + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Copy any text on your screen using OCR"; + homepage = "https://github.com/amebalabs/TRex"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ Br1ght0ne ]; + platforms = lib.platforms.darwin; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +}) From c71c6384b39bc93cb9e951d84bc19dd40bd36df2 Mon Sep 17 00:00:00 2001 From: Oleksii Filonenko Date: Mon, 22 Jun 2026 18:51:26 +0100 Subject: [PATCH 2/2] trex: fix nixpkgs-vet --- pkgs/by-name/tr/trex/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/tr/trex/package.nix b/pkgs/by-name/tr/trex/package.nix index 97f49654e1d6..362d6371748a 100644 --- a/pkgs/by-name/tr/trex/package.nix +++ b/pkgs/by-name/tr/trex/package.nix @@ -9,6 +9,8 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "trex"; version = "2.0.0"; + __structuredAttrs = true; + strictDeps = true; src = fetchurl { url = "https://github.com/amebalabs/TRex/releases/download/v${finalAttrs.version}/TRex-${finalAttrs.version}.zip";