about summary refs log tree commit diff
path: root/pkgs/applications/editors/atom
diff options
context:
space:
mode:
authorYannik Sander <ysndr@users.noreply.github.com>2018-08-05 16:30:30 +0200
committerJörg Thalheim <Mic92@users.noreply.github.com>2018-08-05 15:30:30 +0100
commit57d5e2b20d97775be5c3853b0a04096a36ac224c (patch)
tree585cebb418321fc37edae3ada14f9c80746e1b4a /pkgs/applications/editors/atom
parentf5cf11b2f13bf67e01b65a9a9f0d3413190c235f (diff)
atom: fix crash on Glib-GIO-ERROR
include gtk3 to fix atom's path such that file open dialogs wont cause atom to crash due to missing GIO files

Diffstat (limited to 'pkgs/applications/editors/atom')
-rw-r--r--pkgs/applications/editors/atom/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix
index 83f0f1e822206..0907c7af27da0 100644
--- a/pkgs/applications/editors/atom/default.nix
+++ b/pkgs/applications/editors/atom/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgs, fetchurl, makeWrapper, gvfs, atomEnv}:
+{ stdenv, pkgs, fetchurl, makeWrapper, wrapGAppsHook, gvfs, atomEnv, gtk3}:
 
 let
   common = pname: {version, sha256, beta ? null}:
@@ -14,7 +14,16 @@ let
       inherit sha256;
     };
 
-    nativeBuildInputs = [ makeWrapper ];
+    nativeBuildInputs = [
+      wrapGAppsHook  # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system
+      gtk3  # Fix error: GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
+    ];
+
+    preFixup = ''
+      gappsWrapperArgs+=(
+        --prefix "PATH" : "${gvfs}/bin" \
+      )
+    '';
 
     buildCommand = ''
       mkdir -p $out/usr/
@@ -25,9 +34,6 @@ let
       rm -r $out/share/lintian
       rm -r $out/usr/
       sed -i "s/${pname})/.${pname}-wrapped)/" $out/bin/${pname}
-      # sed -i "s/'${pname}'/'.${pname}-wrapped'/" $out/bin/${pname}
-      wrapProgram $out/bin/${pname} \
-        --prefix "PATH" : "${gvfs}/bin"
 
       fixupPhase