Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atom: Fix #92487 #93621

Merged
merged 1 commit into from
Aug 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions pkgs/applications/editors/atom/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)" \
Expand All @@ -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; {
Expand Down