depot/third_party/nixpkgs/pkgs/tools/misc/mathpix-snipping-tool/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

29 lines
883 B
Nix

{ appimageTools, lib, fetchurl }:
let
pname = "mathpix-snipping-tool";
version = "03.00.0072";
src = fetchurl {
url = "https://download.mathpix.com/linux/Mathpix_Snipping_Tool-x86_64.v${version}.AppImage";
sha256 = "1igg8wnshmg9f23qqw1gqb85h1aa3461c1n7dmgw6sn4lrrrh5ms";
};
appimageContents = appimageTools.extract { inherit pname version src; };
in appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
'';
meta = with lib; {
description = "OCR tool to convert pictures to LaTeX";
homepage = "https://mathpix.com/";
license = licenses.unfree;
maintainers = [ maintainers.hiro98 ];
platforms = [ "x86_64-linux" ];
mainProgram = "mathpix-snipping-tool";
};
}