forked from mirrors/nixpkgs
Merge pull request #75522 from Enteee/bugfix/hopper
hopper: fix libxml2 dynamic linking issue
This commit is contained in:
commit
2d87562b42
|
@ -1,42 +1,77 @@
|
|||
{ stdenv, fetchurl, pkgs, lib }:
|
||||
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, lib
|
||||
, autoPatchelfHook
|
||||
, wrapQtAppsHook
|
||||
, libbsd
|
||||
, python27
|
||||
, gmpxx
|
||||
, ncurses5
|
||||
, gnustep
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hopper";
|
||||
version = "4.5.7";
|
||||
pname = "hopper";
|
||||
version = "4.5.19";
|
||||
rev = "v${lib.versions.major version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-${rev}-${version}-Linux.pkg.tar.xz";
|
||||
sha256 = "1ce7a0f13126a940398aa8da4a74e250dff0401074f30446a8840ac3dbb902c0";
|
||||
sha256 = "1c9wbjwz5xn0skz2a1wpxyx78hhrm8vcbpzagsg4wwnyblap59db";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
ldLibraryPath = with pkgs; stdenv.lib.makeLibraryPath [
|
||||
libbsd.out libffi.out gmpxx.out python27Full.out python27Packages.libxml2 qt5.qtbase zlib xlibs.libX11.out xorg_sys_opengl.out xlibs.libXrender.out gcc-unwrapped.lib
|
||||
nativeBuildInputs = [
|
||||
wrapQtAppsHook
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
|
||||
buildInputs = [
|
||||
libbsd
|
||||
python27
|
||||
gmpxx
|
||||
|
||||
qtWrapperArgs = [ ''--suffix LD_LIBRARY_PATH : ${ldLibraryPath}'' ];
|
||||
ncurses5
|
||||
gnustep.libobjc
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/lib
|
||||
mkdir -p $out/share
|
||||
|
||||
cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
|
||||
cp -r $sourceRoot/opt/hopper-${rev}/lib $out
|
||||
cp -r $sourceRoot/usr/share $out/share
|
||||
patchelf \
|
||||
--set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
|
||||
$out/bin/hopper
|
||||
cp \
|
||||
--archive \
|
||||
$sourceRoot/opt/hopper-${rev}/lib/libBlocksRuntime.so* \
|
||||
$sourceRoot/opt/hopper-${rev}/lib/libdispatch.so* \
|
||||
$sourceRoot/opt/hopper-${rev}/lib/libgnustep-base.so* \
|
||||
$sourceRoot/opt/hopper-${rev}/lib/libHopperCore.so* \
|
||||
$sourceRoot/opt/hopper-${rev}/lib/libkqueue.so* \
|
||||
$sourceRoot/opt/hopper-${rev}/lib/libobjcxx.so* \
|
||||
$sourceRoot/opt/hopper-${rev}/lib/libpthread_workqueue.so* \
|
||||
$out/lib
|
||||
|
||||
cp -r $sourceRoot/usr/share $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
postFixup = ''
|
||||
substituteInPlace "$out/share/applications/hopper-${rev}.desktop" \
|
||||
--replace "Exec=/opt/hopper-${rev}/bin/Hopper" "Exec=$out/bin/hopper"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://www.hopperapp.com/index.html";
|
||||
description = "A macOS and Linux Disassembler";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
maintainers = [ stdenv.lib.maintainers.luis ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [
|
||||
luis
|
||||
Enteee
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1880,7 +1880,7 @@ in
|
|||
|
||||
hostsblock = callPackage ../tools/misc/hostsblock { };
|
||||
|
||||
hopper = callPackage ../development/tools/analysis/hopper {};
|
||||
hopper = qt5.callPackage ../development/tools/analysis/hopper {};
|
||||
|
||||
hr = callPackage ../applications/misc/hr { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue