2019-12-15 14:01:21 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
|
|
|
, autoPatchelfHook
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, libbsd
|
|
|
|
, python27
|
|
|
|
, gmpxx
|
|
|
|
, ncurses5
|
|
|
|
, gnustep
|
2020-02-19 14:58:43 +00:00
|
|
|
, libffi
|
2019-12-15 13:54:28 +00:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
2019-12-15 14:01:21 +00:00
|
|
|
pname = "hopper";
|
2020-05-21 21:32:22 +01:00
|
|
|
version = "4.5.27";
|
2019-03-12 13:48:39 +00:00
|
|
|
rev = "v${lib.versions.major version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-${rev}-${version}-Linux.pkg.tar.xz";
|
2020-05-21 21:32:22 +01:00
|
|
|
sha256 = "1c0lyj20kvb6ljf7zk6hzs70bl5fwnmyiv6w3hhr079bgn4fq4m0";
|
2019-03-12 13:48:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
2019-12-11 20:13:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapQtAppsHook
|
|
|
|
autoPatchelfHook
|
2019-03-12 13:48:39 +00:00
|
|
|
];
|
|
|
|
|
2019-12-11 20:13:30 +00:00
|
|
|
buildInputs = [
|
|
|
|
libbsd
|
|
|
|
python27
|
|
|
|
gmpxx
|
2019-12-15 13:54:28 +00:00
|
|
|
ncurses5
|
|
|
|
gnustep.libobjc
|
2019-12-11 17:34:41 +00:00
|
|
|
];
|
2019-03-12 13:48:39 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2019-12-15 13:54:28 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-07-05 16:42:08 +01:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/lib
|
|
|
|
mkdir -p $out/share
|
2019-12-11 20:13:30 +00:00
|
|
|
|
2019-07-05 16:42:08 +01:00
|
|
|
cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
|
2019-12-15 13:54:28 +00:00
|
|
|
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
|
|
|
|
|
2020-02-19 14:58:43 +00:00
|
|
|
# we already ship libffi.so.7
|
|
|
|
ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib/libffi.so.6
|
|
|
|
|
2019-12-15 13:54:28 +00:00
|
|
|
cp -r $sourceRoot/usr/share $out
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace "$out/share/applications/hopper-${rev}.desktop" \
|
|
|
|
--replace "Exec=/opt/hopper-${rev}/bin/Hopper" "Exec=$out/bin/hopper"
|
2019-03-12 13:48:39 +00:00
|
|
|
'';
|
|
|
|
|
2019-12-11 20:13:30 +00:00
|
|
|
meta = with stdenv.lib; {
|
2019-03-12 13:48:39 +00:00
|
|
|
homepage = "https://www.hopperapp.com/index.html";
|
|
|
|
description = "A macOS and Linux Disassembler";
|
2019-12-11 20:13:30 +00:00
|
|
|
license = licenses.unfree;
|
2019-12-15 13:54:28 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
luis
|
|
|
|
Enteee
|
2019-12-11 20:13:30 +00:00
|
|
|
];
|
|
|
|
platforms = platforms.linux;
|
2019-03-12 13:48:39 +00:00
|
|
|
};
|
|
|
|
}
|