From f2ed702e7eed6c8973e9b93628dd41b38b1615ec Mon Sep 17 00:00:00 2001 From: Renaud Date: Sun, 23 Jan 2022 01:07:49 +0100 Subject: [PATCH] rehex: 0.3.92 -> 0.4.1 * enable parallel building * use SPDX 3.0 license identifier * fix Darwin build * add meta.changelog --- pkgs/applications/editors/rehex/default.nix | 22 +++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/editors/rehex/default.nix b/pkgs/applications/editors/rehex/default.nix index 6a52c7efc27f..3b169bf4e533 100644 --- a/pkgs/applications/editors/rehex/default.nix +++ b/pkgs/applications/editors/rehex/default.nix @@ -2,8 +2,10 @@ , stdenv , fetchFromGitHub , pkg-config +, which , capstone , jansson +, libunistring , lua5_3 , wxGTK31 , Carbon @@ -15,30 +17,33 @@ stdenv.mkDerivation rec { pname = "rehex"; - version = "0.3.92"; + version = "0.4.1"; src = fetchFromGitHub { owner = "solemnwarning"; repo = pname; rev = version; - sha256 = "sha256-yZvJlomUpJwDJOBVSl49lU+JE1YMMs/BSzHepXoFlIY="; + hash = "sha256-NuWWaYABQDaS9wkwmXkBJWHzLFJbUUCiePNQNo4yZrk="; }; postPatch = '' - 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' + # See https://github.com/solemnwarning/rehex/pull/148 + substituteInPlace Makefile.osx \ + --replace '$(filter-out %@2x.png,$(wildcard $(ICONSET)/*.png))' 'res/icon{16,32,128,256,512}.png' ''; - nativeBuildInputs = [ pkg-config ] + nativeBuildInputs = [ pkg-config which ] ++ lib.optionals stdenv.isDarwin [ libicns ]; - buildInputs = [ capstone jansson lua5_3 ] + buildInputs = [ capstone jansson libunistring lua5_3 ] ++ lib.optionals (!stdenv.isDarwin) [ wxGTK31 ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa IOKit wxmac ]; - makeFlags = [ "prefix=$(out)" ] + makeFlags = [ "prefix=${placeholder "out"}" ] ++ lib.optionals stdenv.isDarwin [ "-f Makefile.osx" ]; + enableParallelBuilding = true; + meta = with lib; { description = "Reverse Engineers' Hex Editor"; longDescription = '' @@ -46,7 +51,8 @@ stdenv.mkDerivation rec { engineering, and everything else. ''; homepage = "https://github.com/solemnwarning/rehex"; - license = licenses.gpl2; + changelog = "https://github.com/solemnwarning/rehex/raw/${version}/CHANGES.txt"; + license = licenses.gpl2Only; maintainers = with maintainers; [ markus1189 SuperSandro2000 ]; platforms = platforms.all; };