2021-08-24 13:32:28 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-11-21 17:35:28 +00:00
|
|
|
, fetchFromGitHub
|
2021-08-24 13:32:28 +00:00
|
|
|
, pkg-config
|
2022-01-23 00:07:49 +00:00
|
|
|
, which
|
2022-10-07 23:49:05 +00:00
|
|
|
, zip
|
|
|
|
, libicns
|
2020-11-22 08:13:00 +00:00
|
|
|
, capstone
|
2020-11-21 17:35:28 +00:00
|
|
|
, jansson
|
2022-01-23 00:07:49 +00:00
|
|
|
, libunistring
|
2022-10-25 18:16:03 +00:00
|
|
|
, wxGTK32
|
2022-10-07 23:49:05 +00:00
|
|
|
, lua53Packages
|
|
|
|
, perlPackages
|
2022-10-25 18:16:03 +00:00
|
|
|
, gtk3
|
2021-08-24 13:32:28 +00:00
|
|
|
, Carbon
|
|
|
|
, Cocoa
|
|
|
|
, IOKit
|
2020-11-21 17:35:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rehex";
|
2022-10-25 18:16:03 +00:00
|
|
|
version = "0.5.4";
|
2020-11-21 17:35:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "solemnwarning";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-10-25 18:16:03 +00:00
|
|
|
hash = "sha256-UgwCfy2ssaPuSWeN2SXHBDXv/uLdrDoGr/Q9wXiuCnc=";
|
2020-11-21 17:35:28 +00:00
|
|
|
};
|
|
|
|
|
2022-10-07 23:49:05 +00:00
|
|
|
nativeBuildInputs = [ pkg-config which zip ]
|
2021-08-24 13:32:28 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ libicns ];
|
2020-11-21 17:35:28 +00:00
|
|
|
|
2022-10-25 18:16:03 +00:00
|
|
|
buildInputs = [ capstone jansson libunistring wxGTK32 ]
|
2022-10-07 23:49:05 +00:00
|
|
|
++ (with lua53Packages; [ lua busted ])
|
|
|
|
++ (with perlPackages; [ perl TemplateToolkit ])
|
2022-10-25 18:16:03 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [ gtk3 ]
|
2022-10-07 23:49:05 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ Carbon Cocoa IOKit ];
|
2020-11-22 08:13:00 +00:00
|
|
|
|
2022-01-23 00:07:49 +00:00
|
|
|
makeFlags = [ "prefix=${placeholder "out"}" ]
|
2021-08-24 13:32:28 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ "-f Makefile.osx" ];
|
2020-11-22 08:13:00 +00:00
|
|
|
|
2022-01-23 00:07:49 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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";
|
2022-01-23 00:07:49 +00:00
|
|
|
changelog = "https://github.com/solemnwarning/rehex/raw/${version}/CHANGES.txt";
|
|
|
|
license = licenses.gpl2Only;
|
2022-10-07 23:49:05 +00:00
|
|
|
maintainers = with maintainers; [ markus1189 wegank ];
|
2020-11-21 17:35:28 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|