2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, cairo, xorg, gdk-pixbuf, fontconfig, pango, gnome3, atk, at-spi2-atk, at-spi2-core
|
2020-09-17 11:57:02 +01:00
|
|
|
, gtk3, glib, freetype, dbus, nss, nspr, alsaLib, cups, expat, udev, makeDesktopItem
|
2018-04-02 11:29:14 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-01-23 12:26:19 +00:00
|
|
|
rpath = lib.makeLibraryPath [
|
2018-04-02 11:29:14 +01:00
|
|
|
cairo
|
|
|
|
stdenv.cc.cc
|
2019-05-22 12:03:39 +01:00
|
|
|
gdk-pixbuf
|
2018-04-02 11:29:14 +01:00
|
|
|
fontconfig
|
|
|
|
pango
|
|
|
|
atk
|
2020-09-17 11:57:02 +01:00
|
|
|
gtk3
|
2018-04-02 11:29:14 +01:00
|
|
|
glib
|
|
|
|
freetype
|
|
|
|
dbus
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
alsaLib
|
|
|
|
cups
|
|
|
|
expat
|
2018-07-17 21:11:16 +01:00
|
|
|
udev
|
2020-09-17 12:39:01 +01:00
|
|
|
at-spi2-atk
|
2020-09-17 11:57:02 +01:00
|
|
|
at-spi2-core
|
2018-04-02 11:29:14 +01: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 {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "react-native-debugger";
|
2021-02-03 22:09:56 +00:00
|
|
|
version = "0.11.7";
|
2018-04-02 11:29:14 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jhen0409/react-native-debugger/releases/download/v${version}/rn-debugger-linux-x64.zip";
|
2021-02-03 22:09:56 +00:00
|
|
|
sha256 = "sha256-UXKObJKk9UUgWtm8U+nXWvIJUr4NLm2f//pGTHJISYA=";
|
2018-04-02 11:29:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
buildCommand = ''
|
|
|
|
shopt -s extglob
|
|
|
|
mkdir -p $out
|
|
|
|
unzip $src -d $out
|
|
|
|
|
|
|
|
mkdir $out/{lib,bin,share}
|
2020-09-17 11:57:02 +01:00
|
|
|
mv $out/{libEGL,libGLESv2,libvk_swiftshader,libffmpeg}.so $out/lib
|
2018-04-02 11:29:14 +01: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 11:57:02 +01:00
|
|
|
$out/share/react-native-debugger
|
2018-04-02 11:29:14 +01:00
|
|
|
|
2020-09-17 11:57:02 +01:00
|
|
|
ln -s $out/share/react-native-debugger $out/bin/react-native-debugger
|
2018-04-02 11:29:14 +01:00
|
|
|
|
|
|
|
install -Dm644 "${desktopItem}/share/applications/"* \
|
|
|
|
-t $out/share/applications/
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "rndebugger";
|
2020-09-17 11:57:02 +01:00
|
|
|
exec = "react-native-debugger";
|
2018-04-02 11:29:14 +01:00
|
|
|
desktopName = "React Native Debugger";
|
|
|
|
genericName = "React Native Debugger";
|
2020-09-16 21:45:09 +01:00
|
|
|
categories = "Development;Debugger;";
|
2018-04-02 11:29:14 +01:00
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/jhen0409/react-native-debugger";
|
2018-04-02 11:29:14 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools";
|
2019-12-26 14:13:48 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-04-02 11:29:14 +01:00
|
|
|
};
|
|
|
|
}
|