summary refs log tree commit diff
path: root/pkgs/development/tools/react-native-debugger
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-04-02 12:29:14 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2018-04-02 13:57:03 +0200
commit767f4fec1e4e579f1fb126672103a8eb08e580e4 (patch)
tree560345195f4ca17799de216e6820c270be14e6eb /pkgs/development/tools/react-native-debugger
parent6ba76776651d820fdf02518cb54d009d62568851 (diff)
downloadnixlib-767f4fec1e4e579f1fb126672103a8eb08e580e4.tar
nixlib-767f4fec1e4e579f1fb126672103a8eb08e580e4.tar.gz
nixlib-767f4fec1e4e579f1fb126672103a8eb08e580e4.tar.bz2
nixlib-767f4fec1e4e579f1fb126672103a8eb08e580e4.tar.lz
nixlib-767f4fec1e4e579f1fb126672103a8eb08e580e4.tar.xz
nixlib-767f4fec1e4e579f1fb126672103a8eb08e580e4.tar.zst
nixlib-767f4fec1e4e579f1fb126672103a8eb08e580e4.zip
react-native-debugger: init at 0.7.18
Diffstat (limited to 'pkgs/development/tools/react-native-debugger')
-rw-r--r--pkgs/development/tools/react-native-debugger/default.nix83
1 files changed, 83 insertions, 0 deletions
diff --git a/pkgs/development/tools/react-native-debugger/default.nix b/pkgs/development/tools/react-native-debugger/default.nix
new file mode 100644
index 000000000000..5e88384c58db
--- /dev/null
+++ b/pkgs/development/tools/react-native-debugger/default.nix
@@ -0,0 +1,83 @@
+{ stdenv, fetchurl, unzip, cairo, xorg, gdk_pixbuf, fontconfig, pango, gnome2, atk, gtk2, glib
+, freetype, dbus, nss, nspr, alsaLib, cups, expat, libudev, makeDesktopItem
+}:
+
+let
+  rpath = stdenv.lib.makeLibraryPath [
+    cairo
+    stdenv.cc.cc
+    gdk_pixbuf
+    fontconfig
+    pango
+    atk
+    gtk2
+    glib
+    freetype
+    dbus
+    nss
+    nspr
+    alsaLib
+    cups
+    expat
+    libudev
+
+    gnome2.GConf
+
+    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 {
+  name = "react-native-debugger-${version}";
+  version = "0.7.18";
+
+  src = fetchurl {
+    url = "https://github.com/jhen0409/react-native-debugger/releases/download/v${version}/rn-debugger-linux-x64.zip";
+    sha256 = "186n438sy9wzrx2zdw4qq4hsz89wiy01bpfa6fdjisvxgz6r8sgw";
+  };
+
+  buildInputs = [ unzip ];
+  buildCommand = ''
+    shopt -s extglob
+    mkdir -p $out
+    unzip $src -d $out
+
+    mkdir $out/{lib,bin,share}
+    mv $out/lib{node,ffmpeg}.so $out/lib
+    mv $out/!(lib|share|bin) $out/share
+
+    patchelf \
+      --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+      --set-rpath ${rpath}:$out/lib \
+      $out/share/React\ Native\ Debugger
+
+    ln -s $out/share/React\ Native\ Debugger $out/bin/React\ Native\ Debugger
+
+    install -Dm644 "${desktopItem}/share/applications/"* \
+      -t $out/share/applications/
+  '';
+
+  desktopItem = makeDesktopItem {
+    name = "rndebugger";
+    exec = "React\\ Native\\ Debugger";
+    desktopName = "React Native Debugger";
+    genericName = "React Native Debugger";
+    categories = "Development;Tools;";
+  };
+
+  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; [ ma27 ];
+  };
+}