2022-12-28 21:21:41 +00:00
|
|
|
{ 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
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-02-05 17:12:51 +00:00
|
|
|
rpath = lib.makeLibraryPath [
|
2020-04-24 23:36:52 +00:00
|
|
|
cairo
|
|
|
|
stdenv.cc.cc
|
|
|
|
gdk-pixbuf
|
|
|
|
fontconfig
|
|
|
|
pango
|
|
|
|
atk
|
2020-09-25 04:45:31 +00:00
|
|
|
gtk3
|
2020-04-24 23:36:52 +00:00
|
|
|
glib
|
|
|
|
freetype
|
|
|
|
dbus
|
|
|
|
nss
|
|
|
|
nspr
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
cups
|
|
|
|
expat
|
|
|
|
udev
|
2020-09-25 04:45:31 +00:00
|
|
|
at-spi2-atk
|
|
|
|
at-spi2-core
|
2022-12-28 21:21:41 +00:00
|
|
|
libdrm
|
|
|
|
libxkbcommon
|
|
|
|
mesa
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libxcb
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
];
|
2022-12-28 21:21:41 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "react-native-debugger";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.14.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jhen0409/react-native-debugger/releases/download/v${version}/rn-debugger-linux-x64.zip";
|
2023-10-19 13:55:26 +00:00
|
|
|
sha256 = "sha256-RioBe0MAR47M84aavFaTJikGsJtcZDak8Tkg3WtX2l0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildCommand = ''
|
|
|
|
shopt -s extglob
|
|
|
|
mkdir -p $out
|
|
|
|
unzip $src -d $out
|
|
|
|
|
|
|
|
mkdir $out/{lib,bin,share}
|
2020-09-25 04:45:31 +00:00
|
|
|
mv $out/{libEGL,libGLESv2,libvk_swiftshader,libffmpeg}.so $out/lib
|
2020-04-24 23:36:52 +00:00
|
|
|
mv $out/!(lib|share|bin) $out/share
|
|
|
|
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
|
|
--set-rpath ${rpath}:$out/lib \
|
2020-09-25 04:45:31 +00:00
|
|
|
$out/share/react-native-debugger
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
wrapProgram $out/share/react-native-debugger \
|
|
|
|
--add-flags --no-sandbox
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
ln -s $out/share/react-native-debugger $out/bin/react-native-debugger
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
install -Dm644 "${desktopItem}/share/applications/"* \
|
|
|
|
-t $out/share/applications/
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "rndebugger";
|
2020-09-25 04:45:31 +00:00
|
|
|
exec = "react-native-debugger";
|
2020-04-24 23:36:52 +00:00
|
|
|
desktopName = "React Native Debugger";
|
|
|
|
genericName = "React Native Debugger";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Development" "Debugger" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/jhen0409/react-native-debugger";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools";
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|