2022-12-24 01:29:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
, cairo
|
|
|
|
, xorg
|
|
|
|
, gdk-pixbuf
|
|
|
|
, fontconfig
|
|
|
|
, pango
|
|
|
|
, atk
|
|
|
|
, at-spi2-atk
|
|
|
|
, at-spi2-core
|
|
|
|
, gtk3
|
|
|
|
, glib
|
|
|
|
, freetype
|
|
|
|
, dbus
|
|
|
|
, nss
|
|
|
|
, nspr
|
|
|
|
, alsa-lib
|
|
|
|
, cups
|
|
|
|
, expat
|
|
|
|
, udev
|
|
|
|
, makeDesktopItem
|
|
|
|
, libdrm
|
|
|
|
, libxkbcommon
|
|
|
|
, mesa
|
|
|
|
, makeWrapper
|
2018-04-02 10:29:14 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-01-23 12:26:19 +00:00
|
|
|
rpath = lib.makeLibraryPath [
|
2018-04-02 10:29:14 +00:00
|
|
|
cairo
|
|
|
|
stdenv.cc.cc
|
2019-05-22 11:03:39 +00:00
|
|
|
gdk-pixbuf
|
2018-04-02 10:29:14 +00:00
|
|
|
fontconfig
|
|
|
|
pango
|
|
|
|
atk
|
2020-09-17 10:57:02 +00:00
|
|
|
gtk3
|
2018-04-02 10:29:14 +00:00
|
|
|
glib
|
|
|
|
freetype
|
|
|
|
dbus
|
|
|
|
nss
|
|
|
|
nspr
|
2021-06-10 02:57:09 +00:00
|
|
|
alsa-lib
|
2018-04-02 10:29:14 +00:00
|
|
|
cups
|
|
|
|
expat
|
2018-07-17 20:11:16 +00:00
|
|
|
udev
|
2020-09-17 11:39:01 +00:00
|
|
|
at-spi2-atk
|
2020-09-17 10:57:02 +00:00
|
|
|
at-spi2-core
|
2022-12-24 01:29:07 +00:00
|
|
|
libdrm
|
|
|
|
libxkbcommon
|
|
|
|
mesa
|
2018-04-02 10:29:14 +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-24 01:29:07 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "react-native-debugger";
|
2023-10-06 05:21:22 +00:00
|
|
|
version = "0.14.0";
|
2018-04-02 10:29:14 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jhen0409/react-native-debugger/releases/download/v${version}/rn-debugger-linux-x64.zip";
|
2023-10-06 05:21:22 +00:00
|
|
|
sha256 = "sha256-RioBe0MAR47M84aavFaTJikGsJtcZDak8Tkg3WtX2l0=";
|
2018-04-02 10:29:14 +00:00
|
|
|
};
|
|
|
|
|
2022-12-24 01:29:07 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper unzip ];
|
2018-04-02 10:29:14 +00:00
|
|
|
buildCommand = ''
|
|
|
|
shopt -s extglob
|
|
|
|
mkdir -p $out
|
|
|
|
unzip $src -d $out
|
|
|
|
|
|
|
|
mkdir $out/{lib,bin,share}
|
2020-09-17 10:57:02 +00:00
|
|
|
mv $out/{libEGL,libGLESv2,libvk_swiftshader,libffmpeg}.so $out/lib
|
2018-04-02 10:29:14 +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-17 10:57:02 +00:00
|
|
|
$out/share/react-native-debugger
|
2018-04-02 10:29:14 +00:00
|
|
|
|
2022-12-24 01:29:07 +00:00
|
|
|
wrapProgram $out/share/react-native-debugger \
|
|
|
|
--add-flags --no-sandbox
|
|
|
|
|
2020-09-17 10:57:02 +00:00
|
|
|
ln -s $out/share/react-native-debugger $out/bin/react-native-debugger
|
2018-04-02 10:29:14 +00:00
|
|
|
|
|
|
|
install -Dm644 "${desktopItem}/share/applications/"* \
|
|
|
|
-t $out/share/applications/
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "rndebugger";
|
2020-09-17 10:57:02 +00:00
|
|
|
exec = "react-native-debugger";
|
2018-04-02 10:29:14 +00:00
|
|
|
desktopName = "React Native Debugger";
|
|
|
|
genericName = "React Native Debugger";
|
2022-02-22 14:56:15 +00:00
|
|
|
categories = [ "Development" "Debugger" ];
|
2018-04-02 10:29:14 +00:00
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/jhen0409/react-native-debugger";
|
2022-06-09 23:42:40 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2018-04-02 10:29:14 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "Standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "react-native-debugger";
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2018-04-02 10:29:14 +00:00
|
|
|
};
|
|
|
|
}
|