571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, which
|
|
, zip
|
|
, libicns
|
|
, botan3
|
|
, capstone
|
|
, jansson
|
|
, libunistring
|
|
, wxGTK32
|
|
, lua53Packages
|
|
, perlPackages
|
|
, gtk3
|
|
, apple-sdk_11
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rehex";
|
|
version = "0.62.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "solemnwarning";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-RlYpg3aon1d25n8K/bbHGVLn5/iOOUSlvjT8U0fp9hA=";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config which zip ]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns ];
|
|
|
|
buildInputs = [ botan3 capstone jansson libunistring wxGTK32 ]
|
|
++ (with lua53Packages; [ lua busted ])
|
|
++ (with perlPackages; [ perl TemplateToolkit ])
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3 ]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];
|
|
|
|
makeFlags = [
|
|
"prefix=${placeholder "out"}"
|
|
"BOTAN_PKG=botan-3"
|
|
"CXXSTD=-std=c++20"
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-f Makefile.osx" ];
|
|
|
|
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
|
|
NIX_LDFLAGS = "-liconv";
|
|
};
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
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";
|
|
changelog = "https://github.com/solemnwarning/rehex/raw/${version}/CHANGES.txt";
|
|
license = licenses.gpl2Only;
|
|
maintainers = with maintainers; [ markus1189 wegank ];
|
|
platforms = platforms.all;
|
|
mainProgram = "rehex";
|
|
};
|
|
}
|