forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
47 lines
1.4 KiB
Nix
47 lines
1.4 KiB
Nix
{ lib, 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 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;
|
|
};
|
|
}
|