nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 54 lines 1.4 kB view raw
1{ 2 lib, 3 nix-update-script, 4 fetchurl, 5 appimageTools, 6 makeBinaryWrapper, 7}: 8let 9 pname = "lmath"; 10 version = "1.10.15"; 11 src = fetchurl { 12 url = "https://github.com/lehtoroni/lmath-issues/releases/download/v${version}/LMath_Linux_r${version}-release.AppImage"; 13 hash = "sha256-JOV+g7izjctCkHl5q/9T2PSUZzPzVPisHppbPofVYy0="; 14 }; 15 16 appimageContents = appimageTools.extractType2 { 17 inherit pname version src; 18 }; 19in 20appimageTools.wrapType2 { 21 inherit pname version src; 22 23 nativeBuildInputs = [ 24 makeBinaryWrapper 25 ]; 26 27 # '--skip-updated-bundle-check' stops automatic updates from breaking the package 28 extraInstallCommands = '' 29 install -Dm 444 ${appimageContents}/lmath.desktop $out/share/applications/lmath.desktop 30 install -Dm 444 ${appimageContents}/lmath.png $out/share/icons/hicolor/512x512/apps/lmath.png 31 32 wrapProgram $out/bin/lmath \ 33 --add-flags "--no-update-check" 34 35 substituteInPlace $out/share/applications/lmath.desktop \ 36 --replace-fail 'Exec=AppRun' 'Exec=lmath' 37 ''; 38 39 passthru.updateScript = nix-update-script { 40 extraArgs = [ 41 "--version-regex" 42 "^r([0-9.]*)" 43 ]; 44 }; 45 46 meta = { 47 description = "Simple notebook app with LaTeX capabilities"; 48 homepage = "https://lehtodigital.fi/lmath/"; 49 mainProgram = "lmath"; 50 license = lib.licenses.unfree; 51 maintainers = with lib.maintainers; [ langsjo ]; 52 platforms = [ "x86_64-linux" ]; 53 }; 54}