Merge pull request #93621 from worldofpeace/fix-atom

atom: Fix #92487
This commit is contained in:
worldofpeace 2020-08-01 20:39:08 -04:00 committed by GitHub
commit 3d80450362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,23 +35,30 @@ let
gtk3 # Fix error: GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
ar p $src data.tar.xz | tar xJ ./usr/
'';
installPhase = ''
runHook preInstall
mkdir -p $out
mv usr/bin usr/share $out
rm -rf $out/share/lintian
runHook postInstall
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix "PATH" : "${gvfs}/bin" \
--prefix "PATH" : "${gvfs}/bin"
)
'';
buildCommand = ''
mkdir -p $out/usr/
ar p $src data.tar.xz | tar -C $out -xJ ./usr
sed -i -e "s|Exec=.*$|Exec=$out/bin/${pname}|" $out/usr/share/applications/${pname}.desktop
mv $out/usr/* $out/
rm -r $out/share/lintian
rm -r $out/usr/
sed -i "s/${pname})/.${pname}-wrapped)/" $out/bin/${pname}
fixupPhase
postFixup = ''
share=$out/share/${pname}
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
@ -70,6 +77,8 @@ let
ln -s ${pkgs.git}/bin/git $dugite/git/libexec/git-core/git
find $share -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$share" {} \;
sed -i -e "s|Exec=.*$|Exec=$out/bin/${pname}|" $out/share/applications/${pname}.desktop
'';
meta = with stdenv.lib; {