nixpkgs/pkgs/development/tools/react-native-debugger/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

118 lines
2.3 KiB
Nix
Raw Normal View History

{ 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
2018-04-02 10:29:14 +00:00
}:
let
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
gtk3
2018-04-02 10:29:14 +00:00
glib
freetype
dbus
nss
nspr
alsa-lib
2018-04-02 10:29:14 +00:00
cups
expat
udev
2020-09-17 11:39:01 +00:00
at-spi2-atk
at-spi2-core
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
];
in
stdenv.mkDerivation rec {
pname = "react-native-debugger";
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";
sha256 = "sha256-RioBe0MAR47M84aavFaTJikGsJtcZDak8Tkg3WtX2l0=";
2018-04-02 10:29:14 +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}
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 \
$out/share/react-native-debugger
2018-04-02 10:29:14 +00:00
wrapProgram $out/share/react-native-debugger \
--add-flags --no-sandbox
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";
exec = "react-native-debugger";
2018-04-02 10:29:14 +00:00
desktopName = "React Native Debugger";
genericName = "React Native Debugger";
categories = [ "Development" "Debugger" ];
2018-04-02 10:29:14 +00:00
};
meta = with lib; {
homepage = "https://github.com/jhen0409/react-native-debugger";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2018-04-02 10:29:14 +00:00
license = licenses.mit;
description = "The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools";
mainProgram = "react-native-debugger";
maintainers = with maintainers; [ ];
2018-04-02 10:29:14 +00:00
};
}