chore: fix nix shell on darwin
authorRudi Grinberg <me@rgrinberg.com>
Mon, 5 Sep 2022 22:16:13 +0000 (16:16 -0600)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 6 Sep 2022 15:41:34 +0000 (08:41 -0700)
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
shell.nix

index f9d896259e7b7edee0424f0a3a917aaf54234bee..3a91384c87e6e7f1b4b4296b626e3fc4f3ee6bc9 100644 (file)
--- a/shell.nix
+++ b/shell.nix
@@ -5,9 +5,6 @@ let
   runtimeLibs = with xorg; [
     glib
     pango cairo
-    gtk2-x11
-    gdk_pixbuf
-    gnome2.gtkglext
     pcre
     libGL
     libGLU
@@ -18,7 +15,11 @@ let
     libogg
     libvorbis
     zlib
-  ];
+  ] ++ (if stdenv.isDarwin then [] else [
+    gtk2-x11
+    gdk_pixbuf
+    gnome2.gtkglext
+  ]);
   runtimeLibPath = "/run/opengl-driver/lib:" + lib.makeLibraryPath runtimeLibs;
 in
 (mkClangShell {
@@ -29,7 +30,7 @@ in
     git
     curl
     makeWrapper
-  ];
+  ] ++ (if stdenv.isDarwin then [darwin.apple_sdk.frameworks.Cocoa] else []);
   shellHook = ''
     # Set Gdk pixbuf loaders file to the one from the build dependencies here
     unset GDK_PIXBUF_MODULE_FILE