summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2020-12-11 05:27:27 +0100
committerGitHub <noreply@github.com>2020-12-11 05:27:27 +0100
commit2c0f6135aab77ff942b615228882c7dd996e0882 (patch)
tree181b9fe29a8e4e9af95ec4a5312005b05032385c /pkgs/applications/editors
parente0b40003cb29eef81c2e1338a928e15e7bb8efba (diff)
parentcdb23e9abda8ff0dbf3ff3d85a9a370ddf8a3504 (diff)
Merge pull request #104510 from markus1189/rehex-0.3.1
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/rehex/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/applications/editors/rehex/default.nix b/pkgs/applications/editors/rehex/default.nix
new file mode 100644
index 000000000000..0fe00d08405b
--- /dev/null
+++ b/pkgs/applications/editors/rehex/default.nix
@@ -0,0 +1,46 @@
+{ stdenv
+, fetchFromGitHub
+, capstone
+, jansson
+, wxGTK30
+, darwin
+, libicns
+, wxmac
+}:
+
+stdenv.mkDerivation rec {
+ pname = "rehex";
+ version = "0.3.1";
+
+ src = fetchFromGitHub {
+ owner = "solemnwarning";
+ repo = pname;
+ rev = version;
+ sha256 = "1yj9a63j7534mmz8cl1ifg2wmgkxmk6z75jd8lkmc2sfrjbick32";
+ };
+
+ patchPhase = ''
+ 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'
+ '';
+
+ nativeBuildInputs = stdenv.lib.optionals (stdenv.isDarwin) [ libicns ];
+
+ buildInputs = [ capstone jansson ]
+ ++ (stdenv.lib.optionals (!stdenv.isDarwin) [ wxGTK30 ])
+ ++ (stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Carbon Cocoa IOKit wxmac ]));
+
+ makeFlags = [ "prefix=$(out)" ] ++ (stdenv.lib.optionals stdenv.isDarwin [ "-f Makefile.osx" ]);
+
+ meta = with stdenv.lib; {
+ 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;
+ maintainers = with maintainers; [ markus1189 SuperSandro2000 ];
+ platforms = platforms.all;
+ };
+}