mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
985aa8174d
`appimageTools.wrapType2` no longer creates a binary `$out/bin/${name}` if `pname` and `version` is provided. Derivations that have worked around this behavior with a `mv $out/bin/{${name},${pname}}` broke as a result. This should fix most instances. contex: #271071
30 lines
883 B
Nix
30 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";
|
|
};
|
|
}
|