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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "hopper";
|
pname = "hopper";
|
||||||
version = "4.5.7";
|
version = "4.5.19";
|
||||||
rev = "v${lib.versions.major version}";
|
rev = "v${lib.versions.major version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-${rev}-${version}-Linux.pkg.tar.xz";
|
url = "https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-${rev}-${version}-Linux.pkg.tar.xz";
|
||||||
sha256 = "1ce7a0f13126a940398aa8da4a74e250dff0401074f30446a8840ac3dbb902c0";
|
sha256 = "1c9wbjwz5xn0skz2a1wpxyx78hhrm8vcbpzagsg4wwnyblap59db";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
ldLibraryPath = with pkgs; stdenv.lib.makeLibraryPath [
|
nativeBuildInputs = [
|
||||||
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
|
wrapQtAppsHook
|
||||||
|
autoPatchelfHook
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
|
buildInputs = [
|
||||||
|
libbsd
|
||||||
|
python27
|
||||||
|
gmpxx
|
||||||
|
|
||||||
qtWrapperArgs = [ ''--suffix LD_LIBRARY_PATH : ${ldLibraryPath}'' ];
|
ncurses5
|
||||||
|
gnustep.libobjc
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
mkdir -p $out/share
|
mkdir -p $out/share
|
||||||
|
|
||||||
cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
|
cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
|
||||||
cp -r $sourceRoot/opt/hopper-${rev}/lib $out
|
cp \
|
||||||
cp -r $sourceRoot/usr/share $out/share
|
--archive \
|
||||||
patchelf \
|
$sourceRoot/opt/hopper-${rev}/lib/libBlocksRuntime.so* \
|
||||||
--set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
|
$sourceRoot/opt/hopper-${rev}/lib/libdispatch.so* \
|
||||||
$out/bin/hopper
|
$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";
|
homepage = "https://www.hopperapp.com/index.html";
|
||||||
description = "A macOS and Linux Disassembler";
|
description = "A macOS and Linux Disassembler";
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = licenses.unfree;
|
||||||
maintainers = [ stdenv.lib.maintainers.luis ];
|
maintainers = with maintainers; [
|
||||||
platforms = stdenv.lib.platforms.linux;
|
luis
|
||||||
|
Enteee
|
||||||
|
];
|
||||||
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1880,7 +1880,7 @@ in
|
||||||
|
|
||||||
hostsblock = callPackage ../tools/misc/hostsblock { };
|
hostsblock = callPackage ../tools/misc/hostsblock { };
|
||||||
|
|
||||||
hopper = callPackage ../development/tools/analysis/hopper {};
|
hopper = qt5.callPackage ../development/tools/analysis/hopper {};
|
||||||
|
|
||||||
hr = callPackage ../applications/misc/hr { };
|
hr = callPackage ../applications/misc/hr { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue