lol

Merge pull request #259450 from npulidomateo/reinit-typora

Reinit typora

authored by

Weijia Wang and committed by
GitHub
7546bc61 9034d478

+112
+6
maintainers/maintainer-list.nix
··· 12851 12851 githubId = 9939720; 12852 12852 name = "Philippe Nguyen"; 12853 12853 }; 12854 + npulidomateo = { 12855 + matrix = "@npulidomateo:matrix.org"; 12856 + github = "npulidomateo"; 12857 + githubId = 13149442; 12858 + name = "Nico Pulido-Mateo"; 12859 + }; 12854 12860 nrdxp = { 12855 12861 email = "tim.deh@pm.me"; 12856 12862 matrix = "@timdeh:matrix.org";
+104
pkgs/applications/editors/typora/default.nix
··· 1 + { stdenv 2 + , fetchurl 3 + , dpkg 4 + , lib 5 + , glib 6 + , nss 7 + , nspr 8 + , at-spi2-atk 9 + , cups 10 + , dbus 11 + , libdrm 12 + , gtk3 13 + , pango 14 + , cairo 15 + , xorg 16 + , libxkbcommon 17 + , mesa 18 + , expat 19 + , alsa-lib 20 + , buildFHSEnv 21 + }: 22 + 23 + let 24 + pname = "typora"; 25 + version = "1.7.5"; 26 + src = fetchurl { 27 + url = "https://download.typora.io/linux/typora_${version}_amd64.deb"; 28 + hash = "sha256-4Q+fx1kNu98+nxnI/7hLhE6zOdNsaAiAnW6xVd+hZOI="; 29 + }; 30 + 31 + typoraBase = stdenv.mkDerivation { 32 + inherit pname version src; 33 + 34 + nativeBuildInputs = [ dpkg ]; 35 + 36 + dontConfigure = true; 37 + dontBuild = true; 38 + 39 + installPhase = '' 40 + runHook preInstall 41 + mkdir -p $out/bin $out/share 42 + mv usr/share $out 43 + ln -s $out/share/typora/Typora $out/bin/Typora 44 + runHook postInstall 45 + ''; 46 + }; 47 + 48 + typoraFHS = buildFHSEnv { 49 + name = "typora-fhs"; 50 + targetPkgs = pkgs: (with pkgs; [ 51 + typoraBase 52 + udev 53 + alsa-lib 54 + glib 55 + nss 56 + nspr 57 + atk 58 + cups 59 + dbus 60 + gtk3 61 + libdrm 62 + pango 63 + cairo 64 + mesa 65 + expat 66 + libxkbcommon 67 + ]) ++ (with pkgs.xorg; [ 68 + libX11 69 + libXcursor 70 + libXrandr 71 + libXcomposite 72 + libXdamage 73 + libXext 74 + libXfixes 75 + libxcb 76 + ]); 77 + runScript = '' 78 + Typora $* 79 + ''; 80 + }; 81 + 82 + in stdenv.mkDerivation { 83 + inherit pname version; 84 + 85 + dontUnpack = true; 86 + dontConfigure = true; 87 + dontBuild = true; 88 + 89 + installPhase = '' 90 + runHook preInstall 91 + mkdir -p $out/bin 92 + ln -s ${typoraFHS}/bin/typora-fhs $out/bin/typora 93 + ln -s ${typoraBase}/share/ $out 94 + runHook postInstall 95 + ''; 96 + 97 + meta = with lib; { 98 + description = "A markdown editor, a markdown reader"; 99 + homepage = "https://typora.io/"; 100 + license = licenses.unfree; 101 + maintainers = with maintainers; [ npulidomateo ]; 102 + platforms = [ "x86_64-linux" ]; 103 + }; 104 + }
+2
pkgs/top-level/all-packages.nix
··· 34242 34242 34243 34243 synfigstudio = callPackage ../applications/graphics/synfigstudio { }; 34244 34244 34245 + typora = callPackage ../applications/editors/typora { }; 34246 + 34245 34247 taxi = callPackage ../applications/networking/ftp/taxi { }; 34246 34248 34247 34249 taxi-cli = with python3Packages; toPythonApplication taxi;