Skip to content

Commit

Permalink
atom: Fix #92487
Browse files Browse the repository at this point in the history
We rewrote the expression to use phases from genericBuilder.
#92487 (comment)

(cherry picked from commit 35cb34c)
  • Loading branch information
worldofpeace committed Aug 2, 2020
1 parent fb378d5 commit 7dc4385
Showing 1 changed file with 21 additions and 12 deletions.
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

0 comments on commit 7dc4385

Please sign in to comment.