From aef160eb96b624d9926c9d9abc694b46c16cfbfc Mon Sep 17 00:00:00 2001 From: Oleksii Filonenko Date: Mon, 22 Jun 2026 17:58:09 +0100 Subject: [PATCH] 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 ]; + }; +})