mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 00:08:32 +01:00
typora: 0.9.64 -> 0.9.68
Make the wrapping happen in postFixup or else the wrapper is incomplete. That was noted in #56533 Closes https://github.com/NixOS/nixpkgs/pull/56533
This commit is contained in:
parent
7a8d8e9e7f
commit
f54b4963cf
1 changed files with 23 additions and 11 deletions
|
@ -1,32 +1,44 @@
|
||||||
{ stdenv, fetchurl, makeWrapper, electron_3, dpkg, gtk3, glib, gnome3, wrapGAppsHook }:
|
{ stdenv, fetchurl, makeWrapper, electron_3, dpkg, gtk3, glib, gsettings-desktop-schemas, wrapGAppsHook }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "typora";
|
pname = "typora";
|
||||||
version = "0.9.64";
|
version = "0.9.68";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
|
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
|
||||||
sha256 = "0dffydc11ys2i38gdy8080ph1xlbbzhcdcc06hyfv0dr0nf58a09";
|
sha256 = "09hkmnh9avzb7nc8i67vhbv6nc1v90kk88aq01mpmyibpdqp03zp";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
|
nativeBuildInputs = [
|
||||||
|
dpkg
|
||||||
|
makeWrapper
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ gtk3 glib gnome3.gsettings-desktop-schemas ];
|
buildInputs = [
|
||||||
|
glib
|
||||||
|
gsettings-desktop-schemas
|
||||||
|
gtk3
|
||||||
|
];
|
||||||
|
|
||||||
unpackPhase = "dpkg-deb -x $src .";
|
unpackPhase = "dpkg-deb -x $src .";
|
||||||
|
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/typora
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/bin $out/share
|
||||||
{
|
{
|
||||||
cd usr
|
cd usr
|
||||||
mv share/typora/resources/app/* $out/share/typora
|
mv share/typora/resources/app $out/share/typora
|
||||||
mv share/applications $out/share
|
mv share/{applications,icons,doc} $out/share/
|
||||||
mv share/icons $out/share
|
|
||||||
mv share/doc $out/share
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
makeWrapper ${electron_3}/bin/electron $out/bin/typora \
|
makeWrapper ${electron_3}/bin/electron $out/bin/typora \
|
||||||
--add-flags $out/share/typora \
|
--add-flags $out/share/typora \
|
||||||
"''${gappsWrapperArgs[@]}" \
|
"''${gappsWrapperArgs[@]}" \
|
||||||
|
@ -37,7 +49,7 @@ stdenv.mkDerivation rec {
|
||||||
description = "A minimal Markdown reading & writing app";
|
description = "A minimal Markdown reading & writing app";
|
||||||
homepage = https://typora.io;
|
homepage = https://typora.io;
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
maintainers = with maintainers; [ jensbin ];
|
maintainers = with maintainers; [ jensbin worldofpeace ];
|
||||||
inherit (electron_3.meta) platforms;
|
inherit (electron_3.meta) platforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue