2021-08-24 14:32:28 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-11-21 17:35:28 +00:00
|
|
|
, fetchFromGitHub
|
2021-08-24 14:32:28 +01:00
|
|
|
, pkg-config
|
2020-11-22 08:13:00 +00:00
|
|
|
, capstone
|
2020-11-21 17:35:28 +00:00
|
|
|
, jansson
|
2021-08-24 14:32:28 +01:00
|
|
|
, lua5_3
|
|
|
|
, wxGTK31
|
|
|
|
, Carbon
|
|
|
|
, Cocoa
|
|
|
|
, IOKit
|
2020-11-22 08:13:00 +00:00
|
|
|
, libicns
|
|
|
|
, wxmac
|
2020-11-21 17:35:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rehex";
|
2021-08-26 13:45:17 +01:00
|
|
|
version = "0.3.92";
|
2020-11-21 17:35:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "solemnwarning";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-08-26 13:45:17 +01:00
|
|
|
sha256 = "sha256-yZvJlomUpJwDJOBVSl49lU+JE1YMMs/BSzHepXoFlIY=";
|
2020-11-21 17:35:28 +00:00
|
|
|
};
|
|
|
|
|
2021-08-24 14:32:28 +01:00
|
|
|
postPatch = ''
|
2020-11-22 08:13:00 +00:00
|
|
|
substituteInPlace Makefile.osx --replace 'iconutil -c icns -o $@ $(ICONSET)' \
|
|
|
|
'png2icns $@ $(ICONSET)/icon_16x16.png $(ICONSET)/icon_32x32.png $(ICONSET)/icon_128x128.png $(ICONSET)/icon_256x256.png $(ICONSET)/icon_512x512.png'
|
|
|
|
'';
|
2020-11-21 17:35:28 +00:00
|
|
|
|
2021-08-24 14:32:28 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libicns ];
|
2020-11-21 17:35:28 +00:00
|
|
|
|
2021-08-24 14:32:28 +01:00
|
|
|
buildInputs = [ capstone jansson lua5_3 ]
|
|
|
|
++ lib.optionals (!stdenv.isDarwin) [ wxGTK31 ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Carbon Cocoa IOKit wxmac ];
|
2020-11-22 08:13:00 +00:00
|
|
|
|
2021-08-24 14:32:28 +01:00
|
|
|
makeFlags = [ "prefix=$(out)" ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ "-f Makefile.osx" ];
|
2020-11-22 08:13:00 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-11-21 17:35:28 +00:00
|
|
|
description = "Reverse Engineers' Hex Editor";
|
|
|
|
longDescription = ''
|
|
|
|
A cross-platform (Windows, Linux, Mac) hex editor for reverse
|
|
|
|
engineering, and everything else.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/solemnwarning/rehex";
|
|
|
|
license = licenses.gpl2;
|
2020-11-22 08:13:00 +00:00
|
|
|
maintainers = with maintainers; [ markus1189 SuperSandro2000 ];
|
2020-11-21 17:35:28 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|