4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
83 lines
2.0 KiB
Nix
83 lines
2.0 KiB
Nix
{ lib, 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
|
|
}:
|
|
|
|
let
|
|
rpath = stdenv.lib.makeLibraryPath [
|
|
cairo
|
|
stdenv.cc.cc
|
|
gdk-pixbuf
|
|
fontconfig
|
|
pango
|
|
atk
|
|
gtk3
|
|
glib
|
|
freetype
|
|
dbus
|
|
nss
|
|
nspr
|
|
alsaLib
|
|
cups
|
|
expat
|
|
udev
|
|
at-spi2-atk
|
|
at-spi2-core
|
|
|
|
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.11.5";
|
|
src = fetchurl {
|
|
url = "https://github.com/jhen0409/react-native-debugger/releases/download/v${version}/rn-debugger-linux-x64.zip";
|
|
sha256 = "0b917lihypx7ansy64dmwvgi943yy0n6fs8myam635bsr4l1srzb";
|
|
};
|
|
|
|
buildInputs = [ unzip ];
|
|
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
|
|
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;Debugger;";
|
|
};
|
|
|
|
meta = with 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; [ ];
|
|
};
|
|
}
|