2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv, fetchurl, unzip, cairo, xorg, gdk-pixbuf, fontconfig, pango, gnome3, atk, at-spi2-atk, at-spi2-core
|
|
|
|
, gtk3, glib, freetype, dbus, nss, nspr, alsaLib, cups, expat, udev, makeDesktopItem
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
rpath = stdenv.lib.makeLibraryPath [
|
|
|
|
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
|
|
|
|
alsaLib
|
|
|
|
cups
|
|
|
|
expat
|
|
|
|
udev
|
2020-09-25 04:45:31 +00:00
|
|
|
at-spi2-atk
|
|
|
|
at-spi2-core
|
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
|
|
|
|
];
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "react-native-debugger";
|
2020-11-24 20:58:05 +00:00
|
|
|
version = "0.11.5";
|
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";
|
2020-11-24 20:58:05 +00:00
|
|
|
sha256 = "0b917lihypx7ansy64dmwvgi943yy0n6fs8myam635bsr4l1srzb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
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
|
|
|
|
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";
|
2020-09-25 04:45:31 +00:00
|
|
|
categories = "Development;Debugger;";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/jhen0409/react-native-debugger";
|
|
|
|
license = licenses.mit;
|
|
|
|
description = "The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools";
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|