From 192e7bbb9240d8ceac534dd3b6ead7aa175dc3ce Mon Sep 17 00:00:00 2001 From: James Carragher Date: Sat, 24 Dec 2022 01:29:07 +0000 Subject: [PATCH] react-native-debugger: fix rpath (#193191) fix https://github.com/NixOS/nixpkgs/issues/158478#issuecomment-1108479170 --- .../tools/react-native-debugger/default.nix | 41 +++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/react-native-debugger/default.nix b/pkgs/development/tools/react-native-debugger/default.nix index 967c5541991c..6909c59a92b3 100644 --- a/pkgs/development/tools/react-native-debugger/default.nix +++ b/pkgs/development/tools/react-native-debugger/default.nix @@ -1,5 +1,31 @@ -{ lib, stdenv, fetchurl, unzip, cairo, xorg, gdk-pixbuf, fontconfig, pango, gnome, atk, at-spi2-atk, at-spi2-core -, gtk3, glib, freetype, dbus, nss, nspr, alsa-lib, cups, expat, udev, makeDesktopItem +{ lib +, stdenv +, fetchurl +, unzip +, cairo +, xorg +, gdk-pixbuf +, fontconfig +, pango +, gnome +, atk +, at-spi2-atk +, at-spi2-core +, gtk3 +, glib +, freetype +, dbus +, nss +, nspr +, alsa-lib +, cups +, expat +, udev +, makeDesktopItem +, libdrm +, libxkbcommon +, mesa +, makeWrapper }: let @@ -22,6 +48,9 @@ let udev at-spi2-atk at-spi2-core + libdrm + libxkbcommon + mesa xorg.libX11 xorg.libXcursor @@ -36,7 +65,8 @@ let xorg.libXrender xorg.libXScrnSaver ]; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "react-native-debugger"; version = "0.13.0"; src = fetchurl { @@ -44,7 +74,7 @@ in stdenv.mkDerivation rec { sha256 = "sha256-/uVXMVrVS7n4/mqz6IlKkk63hy67fn9KRjZ1wP5MHB0="; }; - nativeBuildInputs = [ unzip ]; + nativeBuildInputs = [ makeWrapper unzip ]; buildCommand = '' shopt -s extglob mkdir -p $out @@ -59,6 +89,9 @@ in stdenv.mkDerivation rec { --set-rpath ${rpath}:$out/lib \ $out/share/react-native-debugger + wrapProgram $out/share/react-native-debugger \ + --add-flags --no-sandbox + ln -s $out/share/react-native-debugger $out/bin/react-native-debugger install -Dm644 "${desktopItem}/share/applications/"* \