Skip to content

Instantly share code, notes, and snippets.

@maj0e
Created June 9, 2020 07:06
Show Gist options
  • Save maj0e/afca71b435bb1febc1953a1fe6fa3ab6 to your computer and use it in GitHub Desktop.
Save maj0e/afca71b435bb1febc1953a1fe6fa3ab6 to your computer and use it in GitHub Desktop.
{ appimageTools, lib, fetchurl, gtk3, gsettings-desktop-schemas}:
let
pname = "zettlr";
version = "1.6.0";
in appimageTools.wrapType2 rec {
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
sha256 = "0s6p8rs0ag6j3wvhm518hd80s48s3sk8n20s3mazj6xlvvhc6iy5";
};
profile = ''
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
'';
multiPkgs = null; # no 32bit needed
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = "mv $out/bin/{${name},${pname}}";
#installPhase = ''
# lib=$out/lib/${pname}
# mkdir -p $out/bin $lib
# cp -r opt/Zettlr/. $lib
# rpath=${atomEnv.libPath}:${at-spi2-core}/lib:$lib
# makeWrapper $lib/zettlr $out/bin/${pname} \
# --prefix LD_LIBRARY_PATH : "$rpath"
# cp -r usr/share $out
#'';
meta = with lib; {
description = "A markdown editor for writing academic texts and taking notes";
homepage = "https://www.zettlr.com";
platforms = [ "x86_64-linux" ];
license = licenses.gpl3;
maintainers = with maintainers; [ maj0e ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment